diff options
Diffstat (limited to 'lib/libutil/flopen.3')
| -rw-r--r-- | lib/libutil/flopen.3 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libutil/flopen.3 b/lib/libutil/flopen.3 index 53a2132aec4b..0e5fbadacf12 100644 --- a/lib/libutil/flopen.3 +++ b/lib/libutil/flopen.3 @@ -60,6 +60,17 @@ Thus, it is well suited for opening lock files, PID files, spool files, mailboxes and other kinds of files which are used for synchronization between processes. .Pp +If +.Va flags +includes +.Dv O_NONBLOCK +and the file is already locked, +.Fn flopen +will fail and set +.Va errno +to +.Dv EWOULDBLOCK . +.Pp As with .Fn flopen , the additional @@ -68,7 +79,18 @@ argument is required if .Va flags includes .Dv O_CREAT . +.Sh RETURN VALUES +If successful, +.Fn flopen +returns a valid file descriptor. +Otherwise, it returns -1, and sets +.Va errno +as described in +.Xr flock 2 +and +.Xr open 2 . .Sh SEE ALSO +.Xr errno 2 , .Xr flock 2 , .Xr open 2 .Sh AUTHORS |
