Re: Force quitting from a script
Re: Force quitting from a script
- Subject: Re: Force quitting from a script
- From: Axel Luttgens <email@hidden>
- Date: Wed, 23 Dec 2015 10:24:40 +0100
> Le 22 déc. 2015 à 19:06, Stockly, Ed a écrit :
>
> […]
>
> Other times it won't respond to quit, so when the command times out I do a
> shell script:
>
> "killall Google Chrome"
>
> But then I get an error message that there were no processes I owned
> matching the command.
Hello Ed,
With above script, one is trying to kill two processes, process Google and process Chrome.
Assuming string "Google Chrome" is the name of the process of interest, the shell parser must see it as a single argument; this may be easily achieved in this case, for example by surrounding the string with single quotes:
do shell script "/usr/bin/killall 'Google Chrome'"
> So my questions are:
>
> […]
>
> Is there way to find out what the name of a specific process is for the
> killall command? (In case I just have the process name wrong. I've tried
> numerous variations)
For a list of your processes, you may have a look at the output of:
/bin/ps -xc
> Is there a way to make sure that the process (Google Chrome) is owned by
> me when I send the KillAll command?
If you launched Google Chrome, you own it.
The error message is probably a bit too general (could not find process "Google" nor process "Chrome" among your processes).
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden