Re: Getting a PID and killing a process (Was: Re: Scripting a command to unix..)
Re: Getting a PID and killing a process (Was: Re: Scripting a command to unix..)
- Subject: Re: Getting a PID and killing a process (Was: Re: Scripting a command to unix..)
- From: Christopher Nebel <email@hidden>
- Date: Sun, 17 Mar 2002 12:26:22 -0800
On Saturday, March 16, 2002, at 03:10 PM, Hiram wrote:
I am looking for a way to use a shell script to get the PID of a
faceless process (wget) and then kill it, all from within a script.
It seems..
tell application "wget" to quit
..won't work, and neither does giving the full path to wget. Any help
is appreciated.
As others have described, you need to use a combination of "ps" and
"kill" in a "do shell script" command to do this. However, it's an
interesting problem.
Your initial solution, tell app "wget" to quit, didn't work because wget
is written using only BSD Unix APIs, and therefore doesn't understand
Apple events at all. However, you could argue that all applications,
even things like wget, should at least understand "run" and "quit" --
they have the concepts, they just may not know about Apple events. I've
written a feature request.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.