[X-Unix] Kill
William H. Magill
magill at mcgillsociety.org
Wed Feb 25 18:07:59 PST 2004
On 25 Feb, 2004, at 11:05, Alex wrote:
> On Wednesday, Feb 25, 2004, at 10:20 Canada/Eastern, Kirk McElhearn
> wrote:
>
>> [...] perhaps it wasn't TextEdit that was stuck - it might be another
>> process (like the spell check) that TextEdit is using...
>
> Good point. That would explain it rather neatly. Lesson to learn: Be
> wary of unexamined assumptions, especially when they're implicit.
> Thanks, Kirk.
The way to figure out what is actually happening is to use ps (and
possibly lsof) to find out what processes are children of the
particular login session and then to kill them off.
To list all processes belonging to userid magill AND the ppid - parent
process id use:
dun> ps -jU magill
In the example below (which is WIDE, so expand your mail window...)
The PPID of 1 indicates which process is the "beginning".
The tasks with a PPID of 28485 are children of the basic user
environment.
You can trace what is attached to what this way.
lsof -p <pid> can be used to find out what files (including sockets) a
particular program is using.
dun> ps -jU magill
USER PID PPID PGID SESS JOBC STAT TT TIME COMMAND
magill 259 2 259 18f2a38 0 Ss ?? 3:49.70
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/
ATS.framework/Support/ATSServer
magill 28483 1 28483 18f2f9c 0 Ss ?? 0:02.38
/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow
console
magill 28485 1 28485 18f2e88 0 Us ?? 4:01.66
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/
CoreGraphics.framework/Resources/W
magill 28680 28483 28680 18f1394 0 Ss ?? 0:00.76
/System/Library/CoreServices/pbs
magill 28683 28485 28485 18f2e88 0 S ?? 0:03.37
/System/Library/CoreServices/Dock.app/Contents/MacOS/Dock -psn_0_393217
magill 28686 28485 28485 18f2e88 0 S ?? 1:55.27
/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/
SystemUIServer -psn_0_524289
magill 28687 28485 28485 18f2e88 0 S ?? 0:01.35
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
-psn_0_655361
magill 28694 28485 28485 18f2e88 0 S ?? 0:00.70
/System/Library/Image
Capture/Devices/TWAINBridge.app/Contents/MacOS/TWAINBridge
-psn_0_786433
magill 28696 28485 28485 18f2e88 0 S ?? 0:05.55
/Library/PreferencePanes/Scenario.prefPane/Contents/Scenario.app/
Contents/MacOS/Scenario -psn_0_917505
magill 28697 28485 28485 18f2e88 0 S ?? 0:04.65
/Applications/KeyspanDMR.app/Contents/Resources/
DMRMapperApplication.app/Contents/MacOS/DMRMapperAppli
magill 28700 28485 28485 18f2e88 0 S ?? 0:00.44
/Applications/iCal.app/Contents/Resources/iCalAlarmScheduler.app/
Contents/MacOS/iCalAlarmScheduler -ps
magill 28701 28485 28485 18f2e88 0 S ?? 0:04.76
/Library/PreferencePanes/StuffIt
AVR.prefPane/Contents/Resources/StuffItAVRDaemon.app/Contents/MacOS/S
magill 28702 28485 28485 18f2e88 0 S ?? 0:49.78
/Library/PreferencePanes/MouseWorks.prefPane/Contents/Resources/
Support/MouseWorks Background.app/Cont
magill 28703 28485 28485 18f2e88 0 S ?? 0:00.80
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/
ImageCapture.framework/Versions/A/Im
magill 28710 28485 28485 18f2e88 0 S ?? 0:02.41
/System/Library/Services/AppleSpell.service/Contents/MacOS/AppleSpell
-psn_0_2097153
magill 28817 28485 28485 18f2e88 0 S ?? 0:34.52
/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
-psn_0_2621441
magill 28948 28485 28485 18f2e88 0 S ?? 0:22.27
/Applications/Safari.app/Contents/MacOS/Safari -psn_0_3538945
magill 29146 28485 28485 18f2e88 0 S ?? 1:41.57
/Applications/Mail.app/Contents/MacOS/Mail -psn_0_4063233
magill 28951 28950 28951 18f23c0 1 S p1 0:00.10 -bash
magill 29179 29178 29179 18f15bc 1 S std 0:00.11 -bash
T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard - 768 Meg
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
# XP1000 - [Alpha EV6]
magill at mcgillsociety.org
magill at acm.org
magill at mac.com
More information about the X-Unix
mailing list