in reply to Re: unix command question and perl
in thread unix command question and perl

Please don't get into the habit of using 'killall'. It does different things on different platforms and is *dangerous*.

Replies are listed 'Best First'.
Re^3: unix command question and perl
by JavaFan (Canon) on Feb 14, 2011 at 14:53 UTC
    Don't go scare mongering. Obviously, the OP doesn't need to run his command on different platforms (or he wouldn't use ps with a bunch of options.... ;-)). killall on Linux or MacOS isn't more dangerous than his long pipe; nor is pkill on Solaris. Sure, killall on Solaris does what it says it does, but I didn't advocate that.

    Giving advice to "not get into the habit" of using X, because on some platforms X does something else than it does on other platforms is pointless scaremongering - and not really helpful. Being afraid makes louse programmers and sysadmins.