9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] killing none
@ 2008-09-08 17:45 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2008-09-08 17:45 UTC (permalink / raw)
  To: 9fans

in a similar vein, this script can
be quite useful.  the special case
for factotum allows for restarting
most services typically started from
cpurc from the console.

; cat /bin/killuser
#!/bin/rc
rfork en
for(i){
	f=dummy
	while(! ~ $#f 0){
		f=`{ps|awk '$1 == ENVIRON["i"] && $NF != "factotum" {print $2}'}
		for(p in $f){
			chmod a+rw /proc/$p/ctl &&
			echo kill > /proc/$p/ctl
		}
	}
}

- erik



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-08 17:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-08 17:45 [9fans] killing none erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).