Commit Graph

9 Commits

Author SHA1 Message Date
sin 00d7bf4ea5 flock: Check for waitpid() error 2015-12-21 14:13:36 +00:00
sin 0c3440253b flock: Close fd early for correct error propagation
Spotted by FRIGN.
2015-12-21 14:13:36 +00:00
sin 2366164de7 No need for semicolon after ARGEND
This is also the style used in Plan 9.
2015-11-01 10:18:55 +00:00
sin 7b9988c7ff Implement -o for flock(1) to close fd before exec 2015-10-26 11:55:41 +00:00
sin 435b7b5d20 Convert leading whitespace to tabs 2015-10-08 16:18:45 +01:00
sin fb4ca81fe8 Include fcntl.h for open(2)
It was implicitly included via sys/file.h on my system.
2015-10-07 15:21:24 +01:00
sin acca463813 If multiple modes are supplied to flock(1), the last one wins 2015-10-07 10:27:47 +01:00
sin 386fa3d2a7 flock: Set default mode for open(2) 2015-10-07 10:27:47 +01:00
sin 2652dcfd6c Initial implementation of flock(1)
Very useful to prevent overlapping cron jobs amongst other things.
2015-10-07 10:27:47 +01:00