[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pkill
From: |
Andreas Schwab |
Subject: |
Re: pkill |
Date: |
Fri, 30 Sep 2005 00:50:18 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
address@hidden (Eric Blake) writes:
>> Remember, POSIX requires kill(1) to be a shell builtin, because it
>> must support job syntax ("kill %1", for example), which cannot be
>> done with normal POSIX child process semantics.
>>
>> In that case, one can make the builtin kill a wrapper, that parses the
>> command line, and if it see %1 it replaces it with the process job pid
>> and passes that to the real kill, or the builtin kill if no system
>> kill utiltiy exists.
>
> Write your own shell function that does just that. You can
> use 'jobs -p' to find the process number.
Or 'jobs -x' to make that a one-liner.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- pkill, Alfred M\. Szmidt, 2005/09/29
- Re: pkill, Eric Blake, 2005/09/29
- Re: pkill, Eric Blake, 2005/09/29
- Re: pkill,
Andreas Schwab <=
- Re: pkill, Alfred M\. Szmidt, 2005/09/29