cvs commit: src/usr.bin/pkill pkill.1 pkill.c

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Aug 24 20:56:59 GMT 2005


On Wed, Aug 24, 2005 at 04:02:57PM -0400, John Baldwin wrote:
+> On Wednesday 24 August 2005 03:38 pm, Pawel Jakub Dawidek wrote:
+> > pjd         2005-08-24 19:38:28 UTC
+> >
+> >   FreeBSD src repository
+> >
+> >   Modified files:
+> >     usr.bin/pkill        pkill.1 pkill.c
+> >   Log:
+> >   Modify '-F' option to work nicely with pidfile(3) - a pidfile given as
+> >   an argument has to be locked.
+> >
+> >   Revision  Changes    Path
+> >   1.17      +8 -0      src/usr.bin/pkill/pkill.1
+> >   1.27      +14 -0     src/usr.bin/pkill/pkill.c
+> 
+> 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?

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?

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20050824/565a6378/attachment.bin


More information about the cvs-all mailing list