cvs commit: src/usr.bin/pkill pkill.1 pkill.c
Garance A Drosehn
gad at FreeBSD.org
Wed Aug 24 22:14:19 GMT 2005
At 10:56 PM +0200 8/24/05, Pawel Jakub Dawidek wrote:
>On Wed, Aug 24, 2005, John Baldwin wrote:
>+> On Wednesday 24 August 2005, Pawel Jakub Dawidek wrote:
>+> > Log:
>+> > Modify '-F' option to work nicely with pidfile(3) - a pidfile
>+> > given as an argument has to be locked.
>+> I guess the only thing that makes me uncomfortable about this
>+> change is that it means pkill won't work with 3rd party program's
>+> pid files since they are probably not using pidfile(3). Maybe
>+> have some way of turning off the flock requirement?
I must admit that I did not quite understand what you had meant in
your earlier messages about changes to `pkill' to match your new
pid-handling library routines. I agree with John, this change
doesn't seem quite right to me.
>Some daemons, even if they don't use pidfile(3), they do use flock(2)
>to lock the pidfile (eg. cron(8)). I added this option to pkill(1)
>in the past, but I wasn't very happy with it until today...
>On the other hand, I added it to avoid: kill `cat /var/run/daemon.pid`...
>Hmm, what do you think about reverting '-F' behaviour and make it
>use flock(2) only when '-L' is also given?
Something like that would be good, I think. The previous change
was useful as it was, even though I agree it is even more useful
for pkill to pay attention to file-locking when it can.
I'd slightly prefer something other than adding another option,
but I can't think of anything which is particularly better. The
only other suggestion might be to have "daemon.lpid" filenames
instead of "daemon.pid", but that also seems icky to me.
Garance Alistair Drosehn = gad at gilead.netel.rpi.edu
Senior Systems Programmer or gad at FreeBSD.org
Rensselaer Polytechnic Institute; Troy, NY; USA
More information about the cvs-src