From: "Suraj N. Kurapati" Date: 2006-09-27T03:52:58+09:00 Subject: Re: Kill process by his name -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Philip Hallstrom wrote: > Couldn't you take it all the way to this? Wonderful! Thank you :-) > > `ps -C #{File.basename $0} -o pid h`. # no header > map! {|s| s.to_i}. I'm a bit confused here. String class does not have a #map or #map! method, so how is this working? > reject! {|pid| pid == $$}. > each {|pid| Process.kill :SIGTERM, pid} -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFFGXchmV9O7RYnKMcRAvGwAJ9iJyPvoMchkvDxumcTZ17kESsYlACgk6f+ TwvEw+nozO86WU+fZwZBf7g= =9a9N -----END PGP SIGNATURE-----