[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] flock
- Subject: [ale] flock
- From: cfowler at outpostsentinel.com (cfowler)
- Date: Mon, 26 Mar 2007 08:45:11 -0400
- In-reply-to: <1174912527.5055.5.camel@cfowler-laptop>
- References: <[email protected]> <[email protected]> <1174912527.5055.5.camel@cfowler-laptop>
On Mon, 2007-03-26 at 08:35 -0400, cfowler wrote:
> Isn't flock advisory locking? Maybe vipw uses it? In order for it to
> work both programs must use flock.
vipw does not use flock
open("/etc/ptmptmp", O_WRONLY|O_CREAT|O_LARGEFILE, 0600) = 3
link("/etc/ptmptmp", "/etc/ptmp") = 0
unlink("/etc/ptmptmp") = 0
open("/etc/passwd", O_RDONLY|O_LARGEFILE) = 4
read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 8192) = 1414
write(3, "root:x:0:0:root:/root:/bin/bash\n"..., 1414) = 1414
read(4, "", 8192) = 0
close(4) = 0
close(3) = 0
stat64("/etc/ptmp", {st_mode=S_IFREG|0600, st_size=1414, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0xf70f5b08) = 4651
Instead it creates a temp file and if it exists that is the "lock".
- Follow-Ups:
- [ale] flock
- From: jkinney at localnetsolutions.com (James P. Kinney III)
- References:
- [ale] flock
- From: jkinney at localnetsolutions.com (James P. Kinney III)
- [ale] flock
- From: jkinney at localnetsolutions.com (James P. Kinney III)
- [ale] flock
- From: cfowler at outpostsentinel.com (cfowler)