On Wed, Mar 26, 2014 at 3:13 PM, Theo de Raadt <dera...@cvs.openbsd.org> wrote: >> Using pkill(1) correctly should be more efficient than opening a >> file, reading its contents, then passing those as an argument to >> kill(1). > > None of the mechanisms removes the race. > > However, of all the mechanisms, pidfiles are the worst. They > even persist over reboot. >
Sometimes i feel curse (or maybe just tired) : main::(/bin/check_network.pl:164): my $src = system('/usr/bin/pkill -HUP -f "dhclient: trunk0"'); DB<2> n main::(/bin/check_network.pl:165): if ($src) { DB<2> p $src 33024 Of course pkill is supposed to return 0,1,2 or 3 and it does in the shell I wont even try to think further about that. All i wanted was to ask again for a lease , i guess i will just relaunch because -HUP is a lie, the pid change . Simplicity shall prevail ? IMHO , lets remove the HUP signal for dhclient i do not like it anymore !!! Best regards, -- mans says : <<Conversely, if the interface is later manipulated to add or delete addresses then dhclient will automatically exit. It thus automatically exits whenever a new dhclient is run on the same interface.>> -- --------------------------------------------------------------------------------------------------------------------- () ascii ribbon campaign - against html e-mail /\