Page MenuHomeFreeBSD

lockf: add a -T option to terminate the child upon early abort
ClosedPublic

Authored by kevans on Tue, Jun 24, 11:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 10, 6:07 PM
Unknown Object (File)
Mon, Jul 7, 12:21 PM
Unknown Object (File)
Sun, Jul 6, 5:50 PM
Unknown Object (File)
Sat, Jul 5, 8:58 AM
Unknown Object (File)
Sat, Jul 5, 4:23 AM
Unknown Object (File)
Thu, Jul 3, 7:47 AM
Unknown Object (File)
Thu, Jul 3, 7:47 AM
Unknown Object (File)
Thu, Jul 3, 7:47 AM
Subscribers

Details

Summary

This is useful to avoid having the command running twice in the face of
the admin terminating the process. Notably, if the -p option is not in
use (or can't be used, e.g., because we can't open the file for writing)
then this provides a nice alternative where one simply needs to send a
SIGTERM to the lockf(1) process associated with the lock file to clean
it all up.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 65065
Build 61948: arc lint + arc unit

Event Timeline

usr.bin/lockf/lockf.c
68

Should you also convert fdlock, keep, silent, and writepid to bool?

usr.bin/lockf/lockf.c
68

The cosmetic changes are later in the stack, though I did miss fdlock: https://reviews.freebsd.org/D51027

This revision is now accepted and ready to land.Tue, Jul 1, 10:34 AM