01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FCNTL (2) FCNTL (2)<br />

[ENOLCK] Cmd is F _SETLK or F _SETLKW, the type of lock<br />

is a read or write lock, and there are no more record<br />

locks available (too many file segments locked).<br />

[EDEADLK] Cmd is F _SETLKW, the lock is blocked by some<br />

lock from another process, and putting the calling<br />

process to sleep, waiting for that lock to become<br />

free, would cause a deadlock.<br />

[EF AULT] Cmd is F _SETLK, arg points outside the program<br />

address space.<br />

SEE ALSO<br />

close(2), creat(2), dup(2), exec(2), fork(2), open(2), pipe(2), fcntl(S).<br />

DIAGNOSTICS<br />

Upon successful completion, the value returned depends on cmd as<br />

follows:<br />

F _DUPFD A new file descriptor.<br />

F _GETFD Value of flag (only the low-order bit is defined).<br />

F_SETFD Value other than -1.<br />

F _GETFL Value of file flags.<br />

F _SETFL Value other than -1.<br />

F _GETLK Value other than -1.<br />

F _SETLK Value other than -1.<br />

F _SETLKW Value other than -1.<br />

WARNINGS<br />

Because in the future the variable errno will be set to EAGAlN<br />

rather than EACCES when a section of a file is already locked by<br />

another process, portable application programs should expect and<br />

test for either value.<br />

- 3 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!