diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-22 16:39:40 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-22 16:39:40 +0000 |
commit | c48412a4904299c5c9ee02f0c3d01a69fea0c6f5 (patch) | |
tree | e12583665a05f1b0002e492d31c619da8dc71b1d /lib/libpthread/sys/uthread_error.c | |
parent | 5319dea38795eea842e567940566178bd67030b4 (diff) |
o avoid stdio in acquire_daemonlock() so we don't leak FILE * memory
o fix potential long vs. int mismatch in pid reading/writing.
Note that we can't use pid_t for the type of the variable stashed
in the pidfile since we don't have a scanf format for pid_t. Use long
instead since we know pid_t can't be bigger than a long.
o just return if closeflag is set, regardless of the value of fd
o fix potential (unwinnable?) race locking the pid file pointed out by dynamo.
Using O_EXLOCK is not portable but it does help in these situations.
Diffstat (limited to 'lib/libpthread/sys/uthread_error.c')
0 files changed, 0 insertions, 0 deletions