Daniel Ouellet wrote:
Yes, I can use it, but I can't figure out the process ID. I am trying
to understand the man page on this to kill the group 67, or www.
Obviously, I can't figure out the proper use of that syntax here.
Man said
The following PIDs have special meanings:
-1 If superuser, broadcast the signal to all processes; other-
wise, broadcast to all processes belonging to the user.
-pgid Send the signal to all processes within the specified pro-
cess group.
You are confusing user group (i.e. www) with process group (i.e. logical
grouping of processes for job contol, etc..).
obsdev $ id -g
1000
obsdev $ ps -o pid,gid,pgid,command
PID GID PGID COMMAND
31803 1000 31803 -ksh (ksh)
21293 1000 21293 ps -o pid
31754 1000 26374 (netstat)
26374 1000 26374 /bin/sh /usr/local/bin/firefox
7853 1000 26374 /bin/sh /usr/local/mozilla-firefox/run-mozilla.sh
/usr/local/mozilla-firefox/run-mozilla.sh
30367 1000 26374 /usr/local/mozilla-firefox/firefox-bin
30089 1000 26374 /usr/local/libexec/gconfd-2 12
1501 1000 1501 /bin/sh /usr/local/bin/thunderbird
14044 1000 1501 /bin/sh /usr/local/mozilla-thunderbird/run-mozilla.sh
/usr/local/mozilla-thunderbird/run-mozilla.sh
29898 1000 1501 /usr/local/mozilla-thunderbird/thunderbird-bin
6987 1000 6987 -ksh (ksh)
1708 1000 1708 -ksh (ksh)
12309 1000 12309 -ksh (ksh)
See ps(1) and termios(4)
note: termios had the most descriptive explanation of process group
under Job Control that I could find in a few minutes. There probably is
a better man page.
I do not know a way to find process group without forking. An
alternative (if you could not determine process ID) desperation move
would be kill -1 as root (it should not kill system processes according
to kill(2))
-Keith