Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/fcntl.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94 | .\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 17, 2020 | .Dd January 6, 2021 | ||||
.Dt FCNTL 2 | .Dt FCNTL 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm fcntl | .Nm fcntl | ||||
.Nd file control | .Nd file control | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | |||||
or unionfs). | or unionfs). | ||||
This is a hack not intended to be used outside of libc. | This is a hack not intended to be used outside of libc. | ||||
.El | .El | ||||
.Pp | .Pp | ||||
The flags for the | The flags for the | ||||
.Dv F_GETFL | .Dv F_GETFL | ||||
and | and | ||||
.Dv F_SETFL | .Dv F_SETFL | ||||
flags are as follows: | commands are as follows: | ||||
.Bl -tag -width O_NONBLOCKX | .Bl -tag -width O_NONBLOCKX | ||||
.It Dv O_NONBLOCK | .It Dv O_NONBLOCK | ||||
Non-blocking I/O; if no data is available to a | Non-blocking I/O; if no data is available to a | ||||
.Xr read 2 | .Xr read 2 | ||||
system call, or if a | system call, or if a | ||||
.Xr write 2 | .Xr write 2 | ||||
operation would block, | operation would block, | ||||
the read or write call returns -1 with the error | the read or write call returns -1 with the error | ||||
Show All 12 Lines | |||||
avoid caching the data, it will minimize the impact the data has on the cache. | avoid caching the data, it will minimize the impact the data has on the cache. | ||||
Use of this flag can drastically reduce performance if not used with care. | Use of this flag can drastically reduce performance if not used with care. | ||||
.It Dv O_ASYNC | .It Dv O_ASYNC | ||||
Enable the | Enable the | ||||
.Dv SIGIO | .Dv SIGIO | ||||
signal to be sent to the process group | signal to be sent to the process group | ||||
when I/O is possible, e.g., | when I/O is possible, e.g., | ||||
upon availability of data to be read. | upon availability of data to be read. | ||||
.It Dv O_SYNC | |||||
Enable synchronous writes. | |||||
bcr: A line break is needed after a sentence stop. | |||||
Corresponds to the | |||||
.Dv O_SYNC | |||||
flag of | |||||
.Xr open 2 . | |||||
.Dv O_FSYNC | |||||
is an historical synonym for | |||||
.Dv O_SYNC . | |||||
.It Dv O_DSYNC | |||||
Done Inline ActionsAnother line break here after the sentence stop. bcr: Another line break here after the sentence stop. | |||||
Enable synchronous data writes. | |||||
Corresponds to the | |||||
.Dv O_DSYNC | |||||
flag of | |||||
.Xr open 2 . | |||||
.El | .El | ||||
.Pp | .Pp | ||||
The seals that may be applied with | The seals that may be applied with | ||||
.Dv F_ADD_SEALS | .Dv F_ADD_SEALS | ||||
are as follows: | are as follows: | ||||
.Bl -tag -width F_SEAL_SHRINK | .Bl -tag -width F_SEAL_SHRINK | ||||
.It Dv F_SEAL_SEAL | .It Dv F_SEAL_SEAL | ||||
Prevent any further seals from being applied to the file. | Prevent any further seals from being applied to the file. | ||||
▲ Show 20 Lines • Show All 522 Lines • Show Last 20 Lines |
A line break is needed after a sentence stop.