2004-11-03 13:51:07 +00:00
|
|
|
.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
|
_exit.2, access.2, alarm.2, close.2, link.2, mkdir.2, mknod.2, open.2, read.2, rename.2, rmdir.2, s390_runtime_instr.2, symlink.2, unlink.2, write.2, remove.3, charsets.7: srcfix: Tidy copyright notices
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-16 08:39:00 +00:00
|
|
|
.\" and Copyright (C) 1993 Michael Haardt, Ian Jackson.
|
|
|
|
.\" and Copyright (C) 2008 Greg Banks
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, close.2, connect.2, delete_module.2, dup.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, fork.2, fstatat.2, fsync.2, futimesat.2, get_robust_list.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getpagesize.2, getpid.2, getresuid.2, getrlimit.2, getrusage.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, idle.2, init_module.2, intro.2, iopl.2, kcmp.2, kexec_load.2, kill.2, link.2, linkat.2, llseek.2, lookup_dcookie.2, madvise.2, mincore.2, mkdirat.2, mknodat.2, mmap.2, mmap2.2, mount.2, mprotect.2, mq_getsetattr.2, msgctl.2, msgget.2, msgop.2, msync.2, nice.2, open.2, openat.2, pause.2, perfmonctl.2, personality.2, pipe.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, quotactl.2, read.2, readahead.2, readdir.2, readlinkat.2, readv.2, reboot.2, recvmmsg.2, remap_file_pages.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, sendmmsg.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setresuid.2, setuid.2, setup.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, signal.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, splice.2, stat.2, statfs.2, stime.2, subpage_prot.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysfs.2, syslog.2, tee.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, times.2, tkill.2, umask.2, umount.2, uname.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, abort.3, abs.3, acos.3, acosh.3, adjtime.3, aio_init.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, byteorder.3, bzero.3, catgets.3, catopen.3, cbrt.3, ceil.3, clearenv.3, clock.3, clock_getcpuclockid.3, closedir.3, confstr.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, end.3, endian.3, erf.3, erfc.3, ether_aton.3, euidaccess.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fcloseall.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fmod.3, fnmatch.3, fopencookie.3, fpathconf.3, fpurge.3, frexp.3, fseeko.3, ftok.3, futimes.3, gcvt.3, get_nprocs_conf.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getlogin.3, getmntent.3, getnetent.3, getnetent_r.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwnam.3, getrpcent_r.3, gets.3, getservent.3, getservent_r.3, getumask.3, getusershell.3, getutmp.3, getw.3, glob.3, gnu_get_libc_version.3, gsignal.3, hypot.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, j0.3, ldexp.3, localeconv.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, on_exit.3, opendir.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, putenv.3, putpwent.3, puts.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, re_comp.3, readdir.3, realpath.3, regex.3, remainder.3, remove.3, resolver.3, rewinddir.3, rint.3, round.3, scalb.3, scalbln.3, scandir.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setenv.3, setlocale.3, setlogmask.3, shm_open.3, siginterrupt.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdio_ext.3, stpcpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfry.3, strftime.3, string.3, strlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, trunc.3, tsearch.3, ttyslot.3, tzset.3, ulimit.3, undocumented.3, unlocked_stdio.3, usleep.3, y0.3, cpuid.4, full.4, initrd.4, mouse.4, msr.4, sd.4, st.4, acct.5, core.5, services.5, slabinfo.5, aio.7, capabilities.7, credentials.7, feature_test_macros.7, hier.7, inotify.7, libc.7, locale.7, man-pages.7, man.7, math_error.7, mq_overview.7, numa.7, path_resolution.7, pipe.7, pthreads.7, pty.7, rtld-audit.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, suffixes.7, svipc.7, termio.7, time.7, udplite.7, units.7, uri.7, sln.8: s/LICENSE_START(verbatim)/LICENSE_START(VERBATIM)/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:29:01 +00:00
|
|
|
.\" %%%LICENSE_START(VERBATIM)
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, close.2, connect.2, delete_module.2, dup.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, fork.2, fstatat.2, fsync.2, futimesat.2, get_robust_list.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getpagesize.2, getpid.2, getresuid.2, getrlimit.2, getrusage.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, idle.2, init_module.2, intro.2, iopl.2, kcmp.2, kexec_load.2, kill.2, link.2, linkat.2, llseek.2, lookup_dcookie.2, madvise.2, mincore.2, mkdirat.2, mknodat.2, mmap.2, mmap2.2, mount.2, mprotect.2, mq_getsetattr.2, msgctl.2, msgget.2, msgop.2, msync.2, nice.2, open.2, openat.2, pause.2, perfmonctl.2, personality.2, pipe.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, quotactl.2, read.2, readahead.2, readdir.2, readlinkat.2, readv.2, reboot.2, recvmmsg.2, remap_file_pages.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, sendmmsg.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setresuid.2, setuid.2, setup.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, signal.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, splice.2, stat.2, statfs.2, stime.2, subpage_prot.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysfs.2, syslog.2, tee.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, times.2, tkill.2, umask.2, umount.2, uname.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, abort.3, abs.3, acos.3, acosh.3, adjtime.3, aio_init.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, byteorder.3, bzero.3, catgets.3, catopen.3, cbrt.3, ceil.3, clearenv.3, clock.3, clock_getcpuclockid.3, closedir.3, confstr.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, end.3, endian.3, erf.3, erfc.3, ether_aton.3, euidaccess.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fcloseall.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fmod.3, fnmatch.3, fopencookie.3, fpathconf.3, fpurge.3, frexp.3, fseeko.3, ftok.3, futimes.3, gcvt.3, get_nprocs_conf.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getlogin.3, getmntent.3, getnetent.3, getnetent_r.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwnam.3, getrpcent_r.3, gets.3, getservent.3, getservent_r.3, getumask.3, getusershell.3, getutmp.3, getw.3, glob.3, gnu_get_libc_version.3, gsignal.3, hypot.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, j0.3, ldexp.3, localeconv.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, on_exit.3, opendir.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, putenv.3, putpwent.3, puts.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, re_comp.3, readdir.3, realpath.3, regex.3, remainder.3, remove.3, resolver.3, rewinddir.3, rint.3, round.3, scalb.3, scalbln.3, scandir.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setenv.3, setlocale.3, setlogmask.3, shm_open.3, siginterrupt.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdio_ext.3, stpcpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfry.3, strftime.3, string.3, strlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, trunc.3, tsearch.3, ttyslot.3, tzset.3, ulimit.3, undocumented.3, unlocked_stdio.3, usleep.3, y0.3, cpuid.4, full.4, initrd.4, mouse.4, msr.4, sd.4, st.4, acct.5, core.5, services.5, slabinfo.5, aio.7, capabilities.7, credentials.7, feature_test_macros.7, hier.7, inotify.7, libc.7, locale.7, man-pages.7, man.7, math_error.7, mq_overview.7, numa.7, path_resolution.7, pipe.7, pthreads.7, pty.7, rtld-audit.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, suffixes.7, svipc.7, termio.7, time.7, udplite.7, units.7, uri.7, sln.8: Global fix: Add LICENSE_START(verbatim)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:40 +00:00
|
|
|
.\" %%%LICENSE_END
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
|
|
|
.\" Modified 1993-07-21 by Rik Faith <faith@cs.unc.edu>
|
|
|
|
.\" Modified 1994-08-21 by Michael Haardt
|
|
|
|
.\" Modified 1996-04-13 by Andries Brouwer <aeb@cwi.nl>
|
|
|
|
.\" Modified 1996-05-13 by Thomas Koenig
|
|
|
|
.\" Modified 1996-12-20 by Michael Haardt
|
|
|
|
.\" Modified 1999-02-19 by Andries Brouwer <aeb@cwi.nl>
|
|
|
|
.\" Modified 1998-11-28 by Joseph S. Myers <jsm28@hermes.cam.ac.uk>
|
|
|
|
.\" Modified 1999-06-03 by Michael Haardt
|
2007-09-20 06:52:22 +00:00
|
|
|
.\" Modified 2002-05-07 by Michael Kerrisk <mtk.manpages@gmail.com>
|
|
|
|
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
|
2004-12-08 16:41:10 +00:00
|
|
|
.\" 2004-12-08, mtk, reordered flags list alphabetically
|
|
|
|
.\" 2004-12-08, Martin Pool <mbp@sourcefrog.net> (& mtk), added O_NOATIME
|
2007-09-10 04:34:20 +00:00
|
|
|
.\" 2007-09-18, mtk, Added description of O_CLOEXEC + other minor edits
|
2008-01-03 16:06:22 +00:00
|
|
|
.\" 2008-01-03, mtk, with input from Trond Myklebust
|
2008-01-03 08:12:02 +00:00
|
|
|
.\" <trond.myklebust@fys.uio.no> and Timo Sirainen <tss@iki.fi>
|
|
|
|
.\" Rewrite description of O_EXCL.
|
2008-02-11 10:38:24 +00:00
|
|
|
.\" 2008-01-11, Greg Banks <gnb@melbourne.sgi.com>: add more detail
|
|
|
|
.\" on O_DIRECT.
|
2008-05-12 14:38:18 +00:00
|
|
|
.\" 2008-02-26, Michael Haardt: Reorganized text for O_CREAT and mode
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
2008-05-12 14:30:24 +00:00
|
|
|
.\" FIXME . Apr 08: The next POSIX revision has O_EXEC, O_SEARCH, and
|
2008-04-08 11:28:12 +00:00
|
|
|
.\" O_TTYINIT. Eventually these may need to be documented. --mtk
|
2010-09-10 04:37:55 +00:00
|
|
|
.\" FIXME Linux 2.6.33 has O_DSYNC, and a hidden __O_SYNC.
|
2011-09-07 17:16:32 +00:00
|
|
|
.\" FIXME: Linux 2.6.39 added O_PATH
|
2008-04-08 11:28:12 +00:00
|
|
|
.\"
|
2013-02-18 08:05:25 +00:00
|
|
|
.TH OPEN 2 2013-02-18 "Linux" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
|
|
|
open, creat \- open and possibly create a file or device
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
|
|
|
.B #include <sys/types.h>
|
|
|
|
.B #include <sys/stat.h>
|
|
|
|
.B #include <fcntl.h>
|
|
|
|
.sp
|
|
|
|
.BI "int open(const char *" pathname ", int " flags );
|
|
|
|
.BI "int open(const char *" pathname ", int " flags ", mode_t " mode );
|
2007-12-23 13:45:24 +00:00
|
|
|
|
2004-11-03 13:51:07 +00:00
|
|
|
.BI "int creat(const char *" pathname ", mode_t " mode );
|
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
2005-06-22 09:52:33 +00:00
|
|
|
Given a
|
2007-09-20 16:26:31 +00:00
|
|
|
.I pathname
|
2005-06-22 09:52:33 +00:00
|
|
|
for a file,
|
2005-06-21 10:04:56 +00:00
|
|
|
.BR open ()
|
_syscall.2, accept.2, epoll_create.2, inotify_add_watch.2, ioctl.2, msgget.2, msgop.2, open.2, prctl.2, sched_setscheduler.2, semctl.2, semget.2, swapon.2, addseverity.3, cacosh.3, csqrt.3, dirfd.3, drand48.3, fputws.3, mq_send.3, posix_openpt.3, puts.3, sched_getcpu.3, shm_open.3, sqrt.3, sysconf.3, tgamma.3, ulimit.3, credentials.7, svipc.7: Global fix: s/non-negative/nonnegative/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:44:48 +00:00
|
|
|
returns a file descriptor, a small, nonnegative integer
|
2005-06-22 09:52:33 +00:00
|
|
|
for use in subsequent system calls
|
|
|
|
.RB ( read "(2), " write "(2), " lseek "(2), " fcntl "(2), etc.)."
|
|
|
|
The file descriptor returned by a successful call will be
|
2005-06-27 15:35:32 +00:00
|
|
|
the lowest-numbered file descriptor not currently open for the process.
|
2005-06-22 09:52:33 +00:00
|
|
|
.PP
|
2007-09-10 04:34:20 +00:00
|
|
|
By default, the new file descriptor is set to remain open across an
|
2005-06-22 09:52:33 +00:00
|
|
|
.BR execve (2)
|
2005-06-21 10:04:56 +00:00
|
|
|
(i.e., the
|
|
|
|
.B FD_CLOEXEC
|
|
|
|
file descriptor flag described in
|
|
|
|
.BR fcntl (2)
|
2011-09-09 00:11:47 +00:00
|
|
|
is initially disabled; the
|
2007-09-10 04:34:20 +00:00
|
|
|
.B O_CLOEXEC
|
|
|
|
flag, described below, can be used to change this default).
|
2005-06-21 10:04:56 +00:00
|
|
|
The file offset is set to the beginning of the file (see
|
2007-04-12 22:42:49 +00:00
|
|
|
.BR lseek (2)).
|
2005-06-22 09:52:33 +00:00
|
|
|
.PP
|
|
|
|
A call to
|
|
|
|
.BR open ()
|
|
|
|
creates a new
|
|
|
|
.IR "open file description" ,
|
|
|
|
an entry in the system-wide table of open files.
|
|
|
|
This entry records the file offset and the file status flags
|
|
|
|
(modifiable via the
|
2007-05-11 23:07:02 +00:00
|
|
|
.BR fcntl (2)
|
2005-06-22 09:52:33 +00:00
|
|
|
.B F_SETFL
|
|
|
|
operation).
|
2005-06-27 15:35:32 +00:00
|
|
|
A file descriptor is a reference to one of these entries;
|
|
|
|
this reference is unaffected if
|
|
|
|
.I pathname
|
|
|
|
is subsequently removed or modified to refer to a different file.
|
2005-06-22 09:52:33 +00:00
|
|
|
The new open file description is initially not shared
|
2005-06-27 15:35:32 +00:00
|
|
|
with any other process,
|
|
|
|
but sharing may arise via
|
|
|
|
.BR fork (2).
|
2005-06-22 09:52:33 +00:00
|
|
|
.PP
|
2008-07-10 20:53:08 +00:00
|
|
|
The argument
|
2004-11-03 13:51:07 +00:00
|
|
|
.I flags
|
2005-06-22 09:52:33 +00:00
|
|
|
must include one of the following
|
|
|
|
.IR "access modes" :
|
2007-12-05 13:47:50 +00:00
|
|
|
.BR O_RDONLY ", " O_WRONLY ", or " O_RDWR .
|
2005-06-22 09:52:33 +00:00
|
|
|
These request opening the file read-only, write-only, or read/write,
|
|
|
|
respectively.
|
2006-02-02 03:25:41 +00:00
|
|
|
|
|
|
|
In addition, zero or more file creation flags and file status flags
|
2007-04-12 22:42:49 +00:00
|
|
|
can be
|
2004-11-03 13:51:07 +00:00
|
|
|
.RI bitwise- or 'd
|
2005-06-22 09:52:33 +00:00
|
|
|
in
|
2006-02-02 03:25:41 +00:00
|
|
|
.IR flags .
|
2007-04-12 22:42:49 +00:00
|
|
|
The
|
|
|
|
.I file creation flags
|
|
|
|
are
|
2013-02-18 08:05:25 +00:00
|
|
|
.BR O_CLOEXEC ,
|
2013-03-05 17:22:04 +00:00
|
|
|
.BR O_CREAT ,
|
2013-02-18 08:05:25 +00:00
|
|
|
.BR O_DIRECTORY ,
|
|
|
|
.BR O_EXCL ,
|
|
|
|
.BR O_NOCTTY ,
|
|
|
|
.BR O_NOFOLLOW ,
|
|
|
|
.BR O_TRUNC ,
|
|
|
|
and
|
|
|
|
.BR O_TTY_INIT .
|
2007-04-12 22:42:49 +00:00
|
|
|
The
|
|
|
|
.I file status flags
|
2006-02-02 03:25:41 +00:00
|
|
|
are all of the remaining flags listed below.
|
2013-02-18 08:05:25 +00:00
|
|
|
.\" SUSv4 divides the flags into:
|
2008-10-10 13:42:34 +00:00
|
|
|
.\" * Access mode
|
|
|
|
.\" * File creation
|
|
|
|
.\" * File status
|
|
|
|
.\" * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
|
|
|
|
.\" though it's not clear what the difference between "other" and
|
2013-02-18 08:05:25 +00:00
|
|
|
.\" "File creation" flags is. I raised an Aardvark to see if this
|
|
|
|
.\" can be clarified in SUSv4; 10 Oct 2008.
|
|
|
|
.\" http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
|
|
|
|
.\" TC1 (balloted in 2013), resolved this, so that those three constants
|
|
|
|
.\" are also categorized" as file status flags.
|
|
|
|
.\"
|
2006-02-02 03:25:41 +00:00
|
|
|
The distinction between these two groups of flags is that
|
|
|
|
the file status flags can be retrieved and (in some cases)
|
|
|
|
modified using
|
|
|
|
.BR fcntl (2).
|
|
|
|
The full list of file creation flags and file status flags is as follows:
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2004-12-08 16:41:10 +00:00
|
|
|
.B O_APPEND
|
2007-04-12 22:42:49 +00:00
|
|
|
The file is opened in append mode.
|
|
|
|
Before each
|
2007-05-11 23:07:02 +00:00
|
|
|
.BR write (2),
|
2005-07-18 17:10:25 +00:00
|
|
|
the file offset is positioned at the end of the file,
|
2004-12-08 16:41:10 +00:00
|
|
|
as if with
|
2007-05-11 23:07:02 +00:00
|
|
|
.BR lseek (2).
|
2004-12-08 16:41:10 +00:00
|
|
|
.B O_APPEND
|
|
|
|
may lead to corrupted files on NFS file systems if more than one process
|
2007-04-12 22:42:49 +00:00
|
|
|
appends data to a file at once.
|
2008-10-29 16:31:22 +00:00
|
|
|
.\" For more background, see
|
|
|
|
.\" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
|
|
|
|
.\" http://nfs.sourceforge.net/
|
2007-04-12 22:42:49 +00:00
|
|
|
This is because NFS does not support
|
2004-12-08 16:41:10 +00:00
|
|
|
appending to a file, so the client kernel has to simulate it, which
|
|
|
|
can't be done without a race condition.
|
|
|
|
.TP
|
|
|
|
.B O_ASYNC
|
2006-01-15 04:39:23 +00:00
|
|
|
Enable signal-driven I/O:
|
2007-06-21 05:38:48 +00:00
|
|
|
generate a signal
|
|
|
|
.RB ( SIGIO
|
|
|
|
by default, but this can be changed via
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR fcntl (2))
|
|
|
|
when input or output becomes possible on this file descriptor.
|
open.2, poll.2, select_tut.2, getpt.3, openpty.3, posix_openpt.3, ptsname.3, unlockpt.3, pts.4, tty_ioctl.4, proc.5, pty.7: spfix: s/psuedoterminal/psuedoterminal/g
Reported-by: Denis Barbier <bouzim@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-10-13 03:32:15 +00:00
|
|
|
This feature is only available for terminals, pseudoterminals,
|
2005-06-21 10:04:56 +00:00
|
|
|
sockets, and (since Linux 2.6) pipes and FIFOs.
|
|
|
|
See
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR fcntl (2)
|
|
|
|
for further details.
|
2007-09-10 04:34:20 +00:00
|
|
|
.TP
|
|
|
|
.BR O_CLOEXEC " (Since Linux 2.6.23)"
|
|
|
|
Enable the close-on-exec flag for the new file descriptor.
|
2008-10-10 12:01:50 +00:00
|
|
|
Specifying this flag permits a program to avoid additional
|
2007-09-10 04:34:20 +00:00
|
|
|
.BR fcntl (2)
|
|
|
|
.B F_SETFD
|
2008-10-10 12:01:50 +00:00
|
|
|
operations to set the
|
2007-09-20 16:26:31 +00:00
|
|
|
.B FD_CLOEXEC
|
2007-09-10 04:34:20 +00:00
|
|
|
flag.
|
|
|
|
Additionally,
|
|
|
|
use of this flag is essential in some multithreaded programs
|
|
|
|
since using a separate
|
|
|
|
.BR fcntl (2)
|
|
|
|
.B F_SETFD
|
|
|
|
operation to set the
|
2007-09-20 16:26:31 +00:00
|
|
|
.B FD_CLOEXEC
|
2007-09-10 04:34:20 +00:00
|
|
|
flag does not suffice to avoid race conditions
|
|
|
|
where one thread opens a file descriptor at the same
|
|
|
|
time as another thread does a
|
|
|
|
.BR fork (2)
|
|
|
|
plus
|
|
|
|
.BR execve (2).
|
|
|
|
.\" This flag fixes only one form of the race condition;
|
|
|
|
.\" The race can also occur with, for example, descriptors
|
|
|
|
.\" returned by accept(), pipe(), etc.
|
2004-12-08 16:41:10 +00:00
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B O_CREAT
|
|
|
|
If the file does not exist it will be created.
|
|
|
|
The owner (user ID) of the file is set to the effective user ID
|
2007-04-12 22:42:49 +00:00
|
|
|
of the process.
|
|
|
|
The group ownership (group ID) is set either to
|
2004-11-03 13:51:07 +00:00
|
|
|
the effective group ID of the process or to the group ID of the
|
2008-03-19 07:26:08 +00:00
|
|
|
parent directory (depending on file system type and mount options,
|
2008-05-13 10:54:22 +00:00
|
|
|
and the mode of the parent directory, see the mount options
|
2004-11-03 13:51:07 +00:00
|
|
|
.I bsdgroups
|
|
|
|
and
|
|
|
|
.I sysvgroups
|
2008-05-13 10:54:22 +00:00
|
|
|
described in
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR mount (8)).
|
2008-05-13 10:54:22 +00:00
|
|
|
.\" As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
|
|
|
|
.\" XFS (since 2.6.14).
|
2008-02-28 14:47:54 +00:00
|
|
|
.RS
|
|
|
|
.PP
|
|
|
|
.I mode
|
|
|
|
specifies the permissions to use in case a new file is created.
|
|
|
|
This argument must be supplied when
|
|
|
|
.B O_CREAT
|
|
|
|
is specified in
|
|
|
|
.IR flags ;
|
|
|
|
if
|
|
|
|
.B O_CREAT
|
|
|
|
is not specified, then
|
|
|
|
.I mode
|
|
|
|
is ignored.
|
|
|
|
The effective permissions are modified by
|
|
|
|
the process's
|
|
|
|
.I umask
|
|
|
|
in the usual way: The permissions of the created file are
|
2008-04-24 09:36:45 +00:00
|
|
|
.IR "(mode\ &\ ~umask)" .
|
2008-02-28 14:47:54 +00:00
|
|
|
Note that this mode only applies to future accesses of the
|
|
|
|
newly created file; the
|
|
|
|
.BR open ()
|
|
|
|
call that creates a read-only file may well return a read/write
|
|
|
|
file descriptor.
|
|
|
|
.PP
|
|
|
|
The following symbolic constants are provided for
|
|
|
|
.IR mode :
|
|
|
|
.TP 9
|
|
|
|
.B S_IRWXU
|
|
|
|
00700 user (file owner) has read, write and execute permission
|
|
|
|
.TP
|
|
|
|
.B S_IRUSR
|
|
|
|
00400 user has read permission
|
|
|
|
.TP
|
|
|
|
.B S_IWUSR
|
|
|
|
00200 user has write permission
|
|
|
|
.TP
|
|
|
|
.B S_IXUSR
|
|
|
|
00100 user has execute permission
|
|
|
|
.TP
|
|
|
|
.B S_IRWXG
|
|
|
|
00070 group has read, write and execute permission
|
|
|
|
.TP
|
|
|
|
.B S_IRGRP
|
|
|
|
00040 group has read permission
|
|
|
|
.TP
|
|
|
|
.B S_IWGRP
|
|
|
|
00020 group has write permission
|
|
|
|
.TP
|
|
|
|
.B S_IXGRP
|
|
|
|
00010 group has execute permission
|
|
|
|
.TP
|
|
|
|
.B S_IRWXO
|
|
|
|
00007 others have read, write and execute permission
|
|
|
|
.TP
|
|
|
|
.B S_IROTH
|
|
|
|
00004 others have read permission
|
|
|
|
.TP
|
|
|
|
.B S_IWOTH
|
|
|
|
00002 others have write permission
|
|
|
|
.TP
|
|
|
|
.B S_IXOTH
|
|
|
|
00001 others have execute permission
|
|
|
|
.RE
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2008-02-11 10:38:24 +00:00
|
|
|
.BR O_DIRECT " (Since Linux 2.4.10)"
|
2004-12-08 16:41:10 +00:00
|
|
|
Try to minimize cache effects of the I/O to and from this file.
|
|
|
|
In general this will degrade performance, but it is useful in
|
|
|
|
special situations, such as when applications do their own caching.
|
2013-02-18 14:18:52 +00:00
|
|
|
File I/O is done directly to/from user-space buffers.
|
2009-09-20 05:41:16 +00:00
|
|
|
The
|
|
|
|
.B O_DIRECT
|
2012-02-12 21:22:05 +00:00
|
|
|
flag on its own makes an effort to transfer data synchronously,
|
2009-09-20 05:41:16 +00:00
|
|
|
but does not give the guarantees of the
|
|
|
|
.B O_SYNC
|
2012-02-12 21:22:05 +00:00
|
|
|
flag that data and necessary metadata are transferred.
|
|
|
|
To guarantee synchronous I/O,
|
2009-09-20 05:41:16 +00:00
|
|
|
.B O_SYNC
|
|
|
|
must be used in addition to
|
|
|
|
.BR O_DIRECT .
|
2012-03-23 23:21:11 +00:00
|
|
|
See NOTES below for further discussion.
|
2006-03-12 21:18:47 +00:00
|
|
|
.sp
|
2007-04-12 22:42:49 +00:00
|
|
|
A semantically similar (but deprecated) interface for block devices
|
2006-03-12 21:18:47 +00:00
|
|
|
is described in
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR raw (8).
|
|
|
|
.TP
|
|
|
|
.B O_DIRECTORY
|
2007-07-18 20:24:30 +00:00
|
|
|
If \fIpathname\fP is not a directory, cause the open to fail.
|
2005-10-12 10:35:09 +00:00
|
|
|
.\" But see the following and its replies:
|
|
|
|
.\" http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
|
|
|
|
.\" [PATCH] open: O_DIRECTORY and O_CREAT together should fail
|
|
|
|
.\" O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
|
2007-12-25 21:28:09 +00:00
|
|
|
This flag is Linux-specific, and was added in kernel version 2.1.126, to
|
2007-05-12 09:06:04 +00:00
|
|
|
avoid denial-of-service problems if
|
|
|
|
.BR opendir (3)
|
|
|
|
is called on a
|
2004-12-08 16:41:10 +00:00
|
|
|
FIFO or tape device, but should not be used outside of the
|
2007-05-12 13:20:42 +00:00
|
|
|
implementation of
|
|
|
|
.BR opendir (3).
|
2004-12-08 16:41:10 +00:00
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B O_EXCL
|
2008-01-03 08:12:02 +00:00
|
|
|
Ensure that this call creates the file:
|
|
|
|
if this flag is specified in conjunction with
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR O_CREAT ,
|
2008-01-03 08:12:02 +00:00
|
|
|
and
|
|
|
|
.I pathname
|
|
|
|
already exists, then
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR open ()
|
2007-04-12 22:42:49 +00:00
|
|
|
will fail.
|
2008-01-03 08:12:02 +00:00
|
|
|
|
|
|
|
When these two flags are specified, symbolic links are not followed:
|
|
|
|
.\" POSIX.1-2001 explicitly requires this behavior.
|
|
|
|
if
|
|
|
|
.I pathname
|
|
|
|
is a symbolic link, then
|
|
|
|
.BR open ()
|
|
|
|
fails regardless of where the symbolic link points to.
|
|
|
|
|
2010-11-15 05:58:11 +00:00
|
|
|
In general, the behavior of
|
|
|
|
.B O_EXCL
|
|
|
|
is undefined if it is used without
|
|
|
|
.BR O_CREAT .
|
|
|
|
There is one exception: on Linux 2.6 and later,
|
|
|
|
.B O_EXCL
|
|
|
|
can be used without
|
|
|
|
.B O_CREAT
|
|
|
|
if
|
|
|
|
.I pathname
|
|
|
|
refers to a block device.
|
2010-12-03 05:53:39 +00:00
|
|
|
If the block device is in use by the system (e.g., mounted),
|
|
|
|
.BR open ()
|
2010-11-15 05:58:11 +00:00
|
|
|
fails with the error
|
|
|
|
.BR EBUSY .
|
|
|
|
|
2010-06-14 02:38:26 +00:00
|
|
|
On NFS,
|
2008-01-03 08:12:02 +00:00
|
|
|
.B O_EXCL
|
2010-06-14 02:38:26 +00:00
|
|
|
is only supported when using NFSv3 or later on kernel 2.6 or later.
|
|
|
|
In NFS environments where
|
2004-11-03 13:51:07 +00:00
|
|
|
.B O_EXCL
|
2008-01-03 08:12:02 +00:00
|
|
|
support is not provided, programs that rely on it
|
|
|
|
for performing locking tasks will contain a race condition.
|
|
|
|
Portable programs that want to perform atomic file locking using a lockfile,
|
|
|
|
and need to avoid reliance on NFS support for
|
|
|
|
.BR O_EXCL ,
|
|
|
|
can create a unique file on
|
|
|
|
the same file system (e.g., incorporating hostname and PID), and use
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR link (2)
|
2007-04-12 22:42:49 +00:00
|
|
|
to make a link to the lockfile.
|
2007-05-12 09:06:04 +00:00
|
|
|
If
|
|
|
|
.BR link (2)
|
2008-01-03 08:12:02 +00:00
|
|
|
returns 0, the lock is successful.
|
2007-04-12 22:42:49 +00:00
|
|
|
Otherwise, use
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR stat (2)
|
|
|
|
on the unique file to check if its link count has increased to 2,
|
|
|
|
in which case the lock is also successful.
|
|
|
|
.TP
|
2004-12-08 16:41:10 +00:00
|
|
|
.B O_LARGEFILE
|
|
|
|
(LFS)
|
|
|
|
Allow files whose sizes cannot be represented in an
|
2005-11-02 13:55:25 +00:00
|
|
|
.I off_t
|
2004-12-08 16:41:10 +00:00
|
|
|
(but can be represented in an
|
2005-11-02 13:55:25 +00:00
|
|
|
.IR off64_t )
|
2004-12-08 16:41:10 +00:00
|
|
|
to be opened.
|
2007-04-12 22:42:49 +00:00
|
|
|
The
|
2006-11-25 01:00:24 +00:00
|
|
|
.B _LARGEFILE64_SOURCE
|
2010-09-10 04:33:31 +00:00
|
|
|
macro must be defined
|
|
|
|
(before including
|
|
|
|
.I any
|
|
|
|
header files)
|
|
|
|
in order to obtain this definition.
|
2007-04-12 22:42:49 +00:00
|
|
|
Setting the
|
2006-11-25 01:00:24 +00:00
|
|
|
.B _FILE_OFFSET_BITS
|
2006-11-25 18:35:39 +00:00
|
|
|
feature test macro to 64 (rather than using
|
|
|
|
.BR O_LARGEFILE )
|
2011-09-14 07:27:32 +00:00
|
|
|
is the preferred
|
2006-11-25 18:35:39 +00:00
|
|
|
method of accessing large files on 32-bit systems (see
|
2006-11-25 18:22:22 +00:00
|
|
|
.BR feature_test_macros (7)).
|
2004-12-08 16:41:10 +00:00
|
|
|
.TP
|
2007-09-10 04:34:20 +00:00
|
|
|
.BR O_NOATIME " (Since Linux 2.6.8)"
|
2013-02-18 14:25:00 +00:00
|
|
|
Do not update the file last access time
|
|
|
|
.RI ( st_atime
|
|
|
|
in the inode)
|
2005-07-19 07:15:17 +00:00
|
|
|
when the file is
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR read (2).
|
|
|
|
This flag is intended for use by indexing or backup programs,
|
|
|
|
where its use can significantly reduce the amount of disk activity.
|
2008-03-19 07:26:08 +00:00
|
|
|
This flag may not be effective on all file systems.
|
2004-12-08 16:41:10 +00:00
|
|
|
One example is NFS, where the server maintains the access time.
|
2007-06-13 21:48:16 +00:00
|
|
|
.\" The O_NOATIME flag also affects the treatment of st_atime
|
2006-02-08 09:44:13 +00:00
|
|
|
.\" by mmap() and readdir(2), MTK, Dec 04.
|
2004-12-08 16:41:10 +00:00
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B O_NOCTTY
|
|
|
|
If
|
|
|
|
.I pathname
|
intro.1, fork.2, futex.2, open.2, rename.2, select_tut.2, semop.2, spu_create.2, stat.2, netlink.3, random.3, scanf.3, shm_open.3, strftime.3, console.4, console_codes.4, sk98lin.4, st.4, bootparam.7, cpuset.7, credentials.7, man-pages.7, path_resolution.7, uri.7: Global fix: remove spaces around em-dash
Normal English typographical convention is not to have
spaces around em dashes.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2011-10-03 06:47:35 +00:00
|
|
|
refers to a terminal device\(emsee
|
2013-02-18 14:25:00 +00:00
|
|
|
.BR tty (4)\(emit
|
|
|
|
will not become the process's controlling terminal even if the
|
2004-11-03 13:51:07 +00:00
|
|
|
process does not have one.
|
|
|
|
.TP
|
2004-12-08 16:41:10 +00:00
|
|
|
.B O_NOFOLLOW
|
2007-07-18 20:24:30 +00:00
|
|
|
If \fIpathname\fP is a symbolic link, then the open fails.
|
2007-04-12 22:42:49 +00:00
|
|
|
This is a FreeBSD extension, which was added to Linux in version 2.1.126.
|
2004-12-08 16:41:10 +00:00
|
|
|
Symbolic links in earlier components of the pathname will still be
|
2005-06-22 09:52:33 +00:00
|
|
|
followed.
|
|
|
|
.\" The headers from glibc 2.0.100 and later include a
|
|
|
|
.\" definition of this flag; \fIkernels before 2.1.126 will ignore it if
|
2007-07-18 20:24:30 +00:00
|
|
|
.\" used\fP.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.BR O_NONBLOCK " or " O_NDELAY
|
accept.2, connect.2, eventfd.2, flock.2, open.2, posix_fadvise.2, read.2, recv.2, sched_setscheduler.2, select_tut.2, send.2, signalfd.2, splice.2, timerfd_create.2, write.2, flockfile.3, mkfifo.3, mq_notify.3, mq_open.3, pthread_tryjoin_np.3, scanf.3, random.4, ddp.7, epoll.7, fifo.7, ip.7, pipe.7, socket.7, spufs.7: Global fix: s/non-blocking/nonblocking/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:43:10 +00:00
|
|
|
When possible, the file is opened in nonblocking mode.
|
2007-04-12 22:42:49 +00:00
|
|
|
Neither the
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR open ()
|
2004-11-03 13:51:07 +00:00
|
|
|
nor any subsequent operations on the file descriptor which is
|
|
|
|
returned will cause the calling process to wait.
|
|
|
|
For the handling of FIFOs (named pipes), see also
|
2006-04-21 01:46:04 +00:00
|
|
|
.BR fifo (7).
|
2006-03-31 21:12:45 +00:00
|
|
|
For a discussion of the effect of
|
2007-09-20 16:26:31 +00:00
|
|
|
.B O_NONBLOCK
|
2006-03-31 21:12:45 +00:00
|
|
|
in conjunction with mandatory file locks and with file leases, see
|
|
|
|
.BR fcntl (2).
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B O_SYNC
|
2007-04-12 22:42:49 +00:00
|
|
|
The file is opened for synchronous I/O.
|
|
|
|
Any
|
2007-05-11 23:07:02 +00:00
|
|
|
.BR write (2)s
|
2004-11-03 13:51:07 +00:00
|
|
|
on the resulting file descriptor will block the calling process until
|
|
|
|
the data has been physically written to the underlying hardware.
|
2007-05-16 05:33:35 +00:00
|
|
|
.IR "But see NOTES below" .
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2004-12-08 16:41:10 +00:00
|
|
|
.B O_TRUNC
|
|
|
|
If the file already exists and is a regular file and the open mode allows
|
2007-06-22 17:16:20 +00:00
|
|
|
writing (i.e., is
|
|
|
|
.B O_RDWR
|
|
|
|
or
|
|
|
|
.BR O_WRONLY )
|
|
|
|
it will be truncated to length 0.
|
|
|
|
If the file is a FIFO or terminal device file, the
|
|
|
|
.B O_TRUNC
|
2007-04-12 22:42:49 +00:00
|
|
|
flag is ignored.
|
2007-06-22 17:16:20 +00:00
|
|
|
Otherwise the effect of
|
|
|
|
.B O_TRUNC
|
|
|
|
is unspecified.
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
|
|
|
Some of these optional flags can be altered using
|
2007-05-11 23:07:02 +00:00
|
|
|
.BR fcntl (2)
|
2004-11-03 13:51:07 +00:00
|
|
|
after the file has been opened.
|
|
|
|
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR creat ()
|
2004-11-03 13:51:07 +00:00
|
|
|
is equivalent to
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR open ()
|
2004-11-03 13:51:07 +00:00
|
|
|
with
|
|
|
|
.I flags
|
|
|
|
equal to
|
|
|
|
.BR O_CREAT|O_WRONLY|O_TRUNC .
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH RETURN VALUE
|
2007-04-12 22:42:49 +00:00
|
|
|
.BR open ()
|
|
|
|
and
|
2005-10-19 07:29:28 +00:00
|
|
|
.BR creat ()
|
2004-12-08 16:41:10 +00:00
|
|
|
return the new file descriptor, or \-1 if an error occurred
|
|
|
|
(in which case,
|
2004-11-03 13:51:07 +00:00
|
|
|
.I errno
|
|
|
|
is set appropriately).
|
|
|
|
.SH ERRORS
|
|
|
|
.TP
|
|
|
|
.B EACCES
|
|
|
|
The requested access to the file is not allowed, or search permission
|
|
|
|
is denied for one of the directories in the path prefix of
|
|
|
|
.IR pathname ,
|
|
|
|
or the file did not exist yet and write access to the parent directory
|
|
|
|
is not allowed.
|
|
|
|
(See also
|
2007-05-26 12:41:39 +00:00
|
|
|
.BR path_resolution (7).)
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
link.2, mkdir.2, mknod.2, open.2, rename.2, symlink.2, write.2, mkfifo.3: Document EDQUOT error
The return error EDQUOT is not documented in open(2), write(2),
symlink(2) etc..
Whether inodes or disk blocks are required for each function
is something I based on received wisdom and BSD documentation,
rather than tracing the code to the kernel. For symlink(2)
this certainly depends on the file system type.
This patch was previously sent to the linux-man mailing list
as an RFC in September 2010.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-12-22 17:56:59 +00:00
|
|
|
.B EDQUOT
|
|
|
|
Where
|
|
|
|
.B O_CREAT
|
|
|
|
is specified, the file does not exist, and the user's quota of disk
|
|
|
|
blocks or inodes on the file system has been exhausted.
|
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B EEXIST
|
|
|
|
.I pathname
|
|
|
|
already exists and
|
|
|
|
.BR O_CREAT " and " O_EXCL
|
|
|
|
were used.
|
|
|
|
.TP
|
|
|
|
.B EFAULT
|
2007-09-20 16:26:31 +00:00
|
|
|
.I pathname
|
2005-10-19 07:29:28 +00:00
|
|
|
points outside your accessible address space.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2007-01-06 23:31:16 +00:00
|
|
|
.B EFBIG
|
2008-12-04 17:25:19 +00:00
|
|
|
See
|
|
|
|
.BR EOVERFLOW .
|
2007-01-06 23:31:16 +00:00
|
|
|
.TP
|
2008-07-04 15:44:19 +00:00
|
|
|
.B EINTR
|
|
|
|
While blocked waiting to complete an open of a slow device
|
|
|
|
(e.g., a FIFO; see
|
|
|
|
.BR fifo (7)),
|
|
|
|
the call was interrupted by a signal handler; see
|
|
|
|
.BR signal (7).
|
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B EISDIR
|
|
|
|
.I pathname
|
|
|
|
refers to a directory and the access requested involved writing
|
|
|
|
(that is,
|
|
|
|
.B O_WRONLY
|
|
|
|
or
|
|
|
|
.B O_RDWR
|
|
|
|
is set).
|
|
|
|
.TP
|
|
|
|
.B ELOOP
|
|
|
|
Too many symbolic links were encountered in resolving
|
|
|
|
.IR pathname ,
|
2007-07-18 20:24:30 +00:00
|
|
|
or \fBO_NOFOLLOW\fP was specified but
|
2004-11-03 13:51:07 +00:00
|
|
|
.I pathname
|
|
|
|
was a symbolic link.
|
|
|
|
.TP
|
|
|
|
.B EMFILE
|
|
|
|
The process already has the maximum number of files open.
|
|
|
|
.TP
|
|
|
|
.B ENAMETOOLONG
|
2007-09-20 16:26:31 +00:00
|
|
|
.I pathname
|
2005-10-19 07:29:28 +00:00
|
|
|
was too long.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B ENFILE
|
|
|
|
The system limit on the total number of open files has been reached.
|
|
|
|
.TP
|
|
|
|
.B ENODEV
|
|
|
|
.I pathname
|
|
|
|
refers to a device special file and no corresponding device exists.
|
2007-06-22 17:16:20 +00:00
|
|
|
(This is a Linux kernel bug; in this situation
|
|
|
|
.B ENXIO
|
|
|
|
must be returned.)
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.B ENOENT
|
2007-06-22 17:16:20 +00:00
|
|
|
.B O_CREAT
|
|
|
|
is not set and the named file does not exist.
|
2004-11-03 13:51:07 +00:00
|
|
|
Or, a directory component in
|
|
|
|
.I pathname
|
|
|
|
does not exist or is a dangling symbolic link.
|
|
|
|
.TP
|
|
|
|
.B ENOMEM
|
|
|
|
Insufficient kernel memory was available.
|
|
|
|
.TP
|
|
|
|
.B ENOSPC
|
|
|
|
.I pathname
|
|
|
|
was to be created but the device containing
|
|
|
|
.I pathname
|
|
|
|
has no room for the new file.
|
|
|
|
.TP
|
|
|
|
.B ENOTDIR
|
|
|
|
A component used as a directory in
|
|
|
|
.I pathname
|
2007-07-18 20:24:30 +00:00
|
|
|
is not, in fact, a directory, or \fBO_DIRECTORY\fP was specified and
|
2004-11-03 13:51:07 +00:00
|
|
|
.I pathname
|
|
|
|
was not a directory.
|
|
|
|
.TP
|
|
|
|
.B ENXIO
|
2007-06-22 17:16:20 +00:00
|
|
|
.BR O_NONBLOCK " | " O_WRONLY
|
|
|
|
is set, the named file is a FIFO and
|
2004-11-03 13:51:07 +00:00
|
|
|
no process has the file open for reading.
|
|
|
|
Or, the file is a device special file and no corresponding device exists.
|
|
|
|
.TP
|
2008-12-04 17:25:19 +00:00
|
|
|
.B EOVERFLOW
|
|
|
|
.I pathname
|
|
|
|
refers to a regular file that is too large to be opened.
|
|
|
|
The usual scenario here is that an application compiled
|
|
|
|
on a 32-bit platform without
|
2008-12-04 20:46:28 +00:00
|
|
|
.I -D_FILE_OFFSET_BITS=64
|
2008-12-04 17:25:19 +00:00
|
|
|
tried to open a file whose size exceeds
|
|
|
|
.I (2<<31)-1
|
|
|
|
bits;
|
|
|
|
see also
|
|
|
|
.B O_LARGEFILE
|
|
|
|
above.
|
|
|
|
This is the error specified by POSIX.1-2001;
|
|
|
|
in kernels before 2.6.24, Linux gave the error
|
|
|
|
.B EFBIG
|
|
|
|
for this case.
|
|
|
|
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=7253
|
|
|
|
.\" "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
|
|
|
|
.\" Reported 2006-10-03
|
|
|
|
.TP
|
2004-12-08 16:41:10 +00:00
|
|
|
.B EPERM
|
|
|
|
The
|
|
|
|
.B O_NOATIME
|
|
|
|
flag was specified, but the effective user ID of the caller
|
|
|
|
.\" Strictly speaking, it's the file system UID... (MTK)
|
|
|
|
did not match the owner of the file and the caller was not privileged
|
|
|
|
.RB ( CAP_FOWNER ).
|
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B EROFS
|
|
|
|
.I pathname
|
2008-03-19 07:26:08 +00:00
|
|
|
refers to a file on a read-only file system and write access was
|
2004-11-03 13:51:07 +00:00
|
|
|
requested.
|
|
|
|
.TP
|
|
|
|
.B ETXTBSY
|
|
|
|
.I pathname
|
|
|
|
refers to an executable image which is currently being executed and
|
|
|
|
write access was requested.
|
2005-11-17 14:55:31 +00:00
|
|
|
.TP
|
|
|
|
.B EWOULDBLOCK
|
|
|
|
The
|
|
|
|
.B O_NONBLOCK
|
|
|
|
flag was specified, and an incompatible lease was held on the file
|
|
|
|
(see
|
|
|
|
.BR fcntl (2)).
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH CONFORMING TO
|
2006-08-03 13:57:17 +00:00
|
|
|
SVr4, 4.3BSD, POSIX.1-2001.
|
2004-11-03 13:51:07 +00:00
|
|
|
The
|
2007-09-10 04:34:20 +00:00
|
|
|
.BR O_DIRECTORY ,
|
2004-12-08 16:41:10 +00:00
|
|
|
.BR O_NOATIME ,
|
2004-11-03 13:51:07 +00:00
|
|
|
and
|
2007-09-20 16:26:31 +00:00
|
|
|
.B O_NOFOLLOW
|
2008-04-08 11:28:12 +00:00
|
|
|
flags are Linux-specific, and one may need to define
|
2008-05-12 14:30:24 +00:00
|
|
|
.B _GNU_SOURCE
|
2010-09-10 04:33:31 +00:00
|
|
|
(before including
|
|
|
|
.I any
|
|
|
|
header files)
|
2008-05-12 14:30:24 +00:00
|
|
|
to obtain their definitions.
|
2008-04-08 11:28:12 +00:00
|
|
|
|
|
|
|
The
|
|
|
|
.BR O_CLOEXEC
|
|
|
|
flag is not specified in POSIX.1-2001,
|
2008-11-04 13:51:26 +00:00
|
|
|
but is specified in POSIX.1-2008.
|
2008-04-08 11:28:12 +00:00
|
|
|
|
2007-09-20 16:26:31 +00:00
|
|
|
.B O_DIRECT
|
2007-09-19 21:42:14 +00:00
|
|
|
is not specified in POSIX; one has to define
|
2007-09-10 04:34:20 +00:00
|
|
|
.B _GNU_SOURCE
|
2010-09-10 04:33:31 +00:00
|
|
|
(before including
|
|
|
|
.I any
|
|
|
|
header files)
|
2007-09-10 04:34:20 +00:00
|
|
|
to get its definition.
|
2007-05-18 16:06:42 +00:00
|
|
|
.SH NOTES
|
2007-06-21 22:55:04 +00:00
|
|
|
Under Linux, the
|
2007-05-18 16:06:42 +00:00
|
|
|
.B O_NONBLOCK
|
|
|
|
flag indicates that one wants to open
|
|
|
|
but does not necessarily have the intention to read or write.
|
|
|
|
This is typically used to open devices in order to get a file descriptor
|
|
|
|
for use with
|
|
|
|
.BR ioctl (2).
|
2008-06-11 22:04:37 +00:00
|
|
|
|
|
|
|
Unlike the other values that can be specified in
|
|
|
|
.IR flags ,
|
|
|
|
the
|
|
|
|
.I "access mode"
|
|
|
|
values
|
|
|
|
.BR O_RDONLY ", " O_WRONLY ", and " O_RDWR ,
|
|
|
|
do not specify individual bits.
|
|
|
|
Rather, they define the low order two bits of
|
|
|
|
.IR flags ,
|
|
|
|
and are defined respectively as 0, 1, and 2.
|
|
|
|
In other words, the combination
|
|
|
|
.B "O_RDONLY | O_WRONLY"
|
|
|
|
is a logical error, and certainly does not have the same meaning as
|
|
|
|
.BR O_RDWR .
|
accept.2, execve.2, futimesat.2, getresuid.2, getrlimit.2, madvise.2, mq_getsetattr.2, msgctl.2, nice.2, open.2, poll.2, setresuid.2, shmctl.2, sigaction.2, times.2, utimensat.2, __setfpucw.3, atoi.3, endian.3, err.3, euidaccess.3, fenv.3, fopencookie.3, fpurge.3, getgrouplist.3, getutmp.3, j0.3, lgamma.3, netlink.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_cleanup_push_defer_np.3, pthread_getattr_np.3, pthread_kill_other_threads_np.3, pthread_setaffinity_np.3, pthread_tryjoin_np.3, pthread_yield.3, random_r.3, readdir.3, rtnetlink.3, scanf.3, setenv.3, significand.3, sigsetops.3, strerror.3, strstr.3, sysv_signal.3, termios.3, timegm.3, unlocked_stdio.3, y0.3, locale.5, bootparam.7, feature_test_macros.7, ip.7, locale.7, pthreads.7, rtld-audit.7, nscd.8: Global fix: s/non-standard/nonstandard/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:37:52 +00:00
|
|
|
Linux reserves the special, nonstandard access mode 3 (binary 11) in
|
2008-06-11 22:04:37 +00:00
|
|
|
.I flags
|
|
|
|
to mean:
|
|
|
|
check for read and write permission on the file and return a descriptor
|
|
|
|
that can't be used for reading or writing.
|
accept.2, execve.2, futimesat.2, getresuid.2, getrlimit.2, madvise.2, mq_getsetattr.2, msgctl.2, nice.2, open.2, poll.2, setresuid.2, shmctl.2, sigaction.2, times.2, utimensat.2, __setfpucw.3, atoi.3, endian.3, err.3, euidaccess.3, fenv.3, fopencookie.3, fpurge.3, getgrouplist.3, getutmp.3, j0.3, lgamma.3, netlink.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_cleanup_push_defer_np.3, pthread_getattr_np.3, pthread_kill_other_threads_np.3, pthread_setaffinity_np.3, pthread_tryjoin_np.3, pthread_yield.3, random_r.3, readdir.3, rtnetlink.3, scanf.3, setenv.3, significand.3, sigsetops.3, strerror.3, strstr.3, sysv_signal.3, termios.3, timegm.3, unlocked_stdio.3, y0.3, locale.5, bootparam.7, feature_test_macros.7, ip.7, locale.7, pthreads.7, rtld-audit.7, nscd.8: Global fix: s/non-standard/nonstandard/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:37:52 +00:00
|
|
|
This nonstandard access mode is used by some Linux drivers to return a
|
2008-06-11 22:04:37 +00:00
|
|
|
descriptor that is only to be used for device-specific
|
|
|
|
.BR ioctl (2)
|
|
|
|
operations.
|
|
|
|
.\" See for example util-linux's disk-utils/setfdprm.c
|
|
|
|
.\" For some background on access mode 3, see
|
|
|
|
.\" http://thread.gmane.org/gmane.linux.kernel/653123
|
|
|
|
.\" "[RFC] correct flags to f_mode conversion in __dentry_open"
|
|
|
|
.\" LKML, 12 Mar 2008
|
2004-11-03 13:51:07 +00:00
|
|
|
.LP
|
|
|
|
The (undefined) effect of
|
|
|
|
.B O_RDONLY | O_TRUNC
|
2007-04-12 22:42:49 +00:00
|
|
|
varies among implementations.
|
2006-11-25 01:00:24 +00:00
|
|
|
On many systems the file is actually truncated.
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Linux 2.0, 2.5: truncate
|
|
|
|
.\" Solaris 5.7, 5.8: truncate
|
|
|
|
.\" Irix 6.5: truncate
|
|
|
|
.\" Tru64 5.1B: truncate
|
|
|
|
.\" HP-UX 11.22: truncate
|
|
|
|
.\" FreeBSD 4.7: truncate
|
2007-05-18 16:06:42 +00:00
|
|
|
.PP
|
|
|
|
There are many infelicities in the protocol underlying NFS, affecting
|
|
|
|
amongst others
|
|
|
|
.BR O_SYNC " and " O_NDELAY .
|
|
|
|
|
2007-06-08 09:56:56 +00:00
|
|
|
POSIX provides for three different variants of synchronized I/O,
|
2009-09-20 05:41:16 +00:00
|
|
|
corresponding to the flags
|
|
|
|
.BR O_SYNC ,
|
|
|
|
.BR O_DSYNC ,
|
|
|
|
and
|
|
|
|
.BR O_RSYNC .
|
|
|
|
Currently (2.6.31), Linux only implements
|
|
|
|
.BR O_SYNC ,
|
|
|
|
but glibc maps
|
|
|
|
.B O_DSYNC
|
|
|
|
and
|
|
|
|
.B O_RSYNC
|
|
|
|
to the same numerical value as
|
2010-08-29 04:39:28 +00:00
|
|
|
.BR O_SYNC .
|
2010-06-15 03:16:42 +00:00
|
|
|
Most Linux file systems don't actually implement the POSIX
|
2009-09-20 05:41:16 +00:00
|
|
|
.B O_SYNC
|
|
|
|
semantics, which require all metadata updates of a write
|
eventfd.2, futex.2, mmap2.2, open.2, pciconfig_read.2, ptrace.2, reboot.2, request_key.2, sched_rr_get_interval.2, splice.2, stat.2, sync_file_range.2, syscalls.2, timer_create.2, vm86.2, pthread_attr_setscope.3, core.5, proc.5, aio.7, futex.7, netlink.7, time.7: Global fix: "userspace" ==> "user space" or "user-space"
Existing pages variously use "userspace or "user space".
But, "userspace" is not quite an English word.
So change "userspace" to "user space" or, when used
attributively, "user-space".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-10-21 06:04:42 +00:00
|
|
|
to be on disk on returning to user space, but only the
|
2009-09-20 05:41:16 +00:00
|
|
|
.B O_DSYNC
|
|
|
|
semantics, which require only actual file data and metadata necessary
|
|
|
|
to retrieve it to be on disk by the time the system call returns.
|
2007-05-18 16:06:42 +00:00
|
|
|
|
|
|
|
Note that
|
|
|
|
.BR open ()
|
|
|
|
can open device special files, but
|
|
|
|
.BR creat ()
|
|
|
|
cannot create them; use
|
|
|
|
.BR mknod (2)
|
|
|
|
instead.
|
|
|
|
.LP
|
|
|
|
On NFS file systems with UID mapping enabled,
|
|
|
|
.BR open ()
|
|
|
|
may
|
2007-06-08 11:56:22 +00:00
|
|
|
return a file descriptor but, for example,
|
2007-05-18 16:06:42 +00:00
|
|
|
.BR read (2)
|
|
|
|
requests are denied
|
|
|
|
with \fBEACCES\fP.
|
|
|
|
This is because the client performs
|
|
|
|
.BR open ()
|
|
|
|
by checking the
|
|
|
|
permissions, but UID mapping is performed by the server upon
|
|
|
|
read and write requests.
|
|
|
|
|
|
|
|
If the file is newly created, its
|
2007-06-21 22:55:04 +00:00
|
|
|
.IR st_atime ,
|
2007-05-18 16:06:42 +00:00
|
|
|
.IR st_ctime ,
|
|
|
|
.I st_mtime
|
|
|
|
fields
|
|
|
|
(respectively, time of last access, time of last status change, and
|
|
|
|
time of last modification; see
|
|
|
|
.BR stat (2))
|
|
|
|
are set
|
|
|
|
to the current time, and so are the
|
|
|
|
.I st_ctime
|
2007-06-21 22:55:04 +00:00
|
|
|
and
|
2007-05-18 16:06:42 +00:00
|
|
|
.I st_mtime
|
|
|
|
fields of the
|
|
|
|
parent directory.
|
2007-06-21 22:55:04 +00:00
|
|
|
Otherwise, if the file is modified because of the
|
2007-05-18 16:06:42 +00:00
|
|
|
.B O_TRUNC
|
|
|
|
flag, its st_ctime and st_mtime fields are set to the current time.
|
2008-02-11 10:38:24 +00:00
|
|
|
.SS O_DIRECT
|
|
|
|
.LP
|
|
|
|
The
|
|
|
|
.B O_DIRECT
|
|
|
|
flag may impose alignment restrictions on the length and address
|
eventfd.2, futex.2, mmap2.2, open.2, pciconfig_read.2, ptrace.2, reboot.2, request_key.2, sched_rr_get_interval.2, splice.2, stat.2, sync_file_range.2, syscalls.2, timer_create.2, vm86.2, pthread_attr_setscope.3, core.5, proc.5, aio.7, futex.7, netlink.7, time.7: Global fix: "userspace" ==> "user space" or "user-space"
Existing pages variously use "userspace or "user space".
But, "userspace" is not quite an English word.
So change "userspace" to "user space" or, when used
attributively, "user-space".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-10-21 06:04:42 +00:00
|
|
|
of user-space buffers and the file offset of I/Os.
|
2008-02-11 10:38:24 +00:00
|
|
|
In Linux alignment
|
2008-03-19 07:26:08 +00:00
|
|
|
restrictions vary by file system and kernel version and might be
|
2008-02-11 10:38:24 +00:00
|
|
|
absent entirely.
|
2008-03-19 07:26:08 +00:00
|
|
|
However there is currently no file system\-independent
|
2008-02-11 10:38:24 +00:00
|
|
|
interface for an application to discover these restrictions for a given
|
2008-03-19 07:26:08 +00:00
|
|
|
file or file system.
|
|
|
|
Some file systems provide their own interfaces
|
2008-02-11 10:38:24 +00:00
|
|
|
for doing so, for example the
|
|
|
|
.B XFS_IOC_DIOINFO
|
|
|
|
operation in
|
|
|
|
.BR xfsctl (3).
|
|
|
|
.LP
|
2008-11-14 18:58:09 +00:00
|
|
|
Under Linux 2.4, transfer sizes, and the alignment of the user buffer
|
|
|
|
and the file offset must all be multiples of the logical block size
|
2008-02-11 10:38:24 +00:00
|
|
|
of the file system.
|
2012-05-01 05:51:47 +00:00
|
|
|
Under Linux 2.6, alignment to 512-byte boundaries suffices.
|
2012-05-09 05:50:54 +00:00
|
|
|
.LP
|
|
|
|
.B O_DIRECT
|
|
|
|
I/Os should never be run concurrently with the
|
2012-05-01 05:51:47 +00:00
|
|
|
.BR fork (2)
|
2012-05-09 05:50:54 +00:00
|
|
|
system call,
|
|
|
|
if the memory buffer is a private mapping
|
|
|
|
(i.e., any mapping created with the
|
2012-06-07 13:18:51 +00:00
|
|
|
.BR mmap (2)
|
2012-05-09 05:50:54 +00:00
|
|
|
.BR MAP_PRIVATE
|
2012-05-10 20:13:04 +00:00
|
|
|
flag;
|
2012-05-09 05:50:54 +00:00
|
|
|
this includes memory allocated on the heap and statically allocated buffers).
|
|
|
|
Any such I/Os, whether submitted via an asynchronous I/O interface or from
|
|
|
|
another thread in the process,
|
|
|
|
should be completed before
|
|
|
|
.BR fork (2)
|
|
|
|
is called.
|
|
|
|
Failure to do so can result in data corruption and undefined behavior in
|
|
|
|
parent and child processes.
|
|
|
|
This restriction does not apply when the memory buffer for the
|
|
|
|
.B O_DIRECT
|
|
|
|
I/Os was created using
|
|
|
|
.BR shmat (2)
|
|
|
|
or
|
|
|
|
.BR mmap (2)
|
|
|
|
with the
|
|
|
|
.B MAP_SHARED
|
|
|
|
flag.
|
|
|
|
Nor does this restriction apply when the memory buffer has been advised as
|
|
|
|
.B MADV_DONTFORK
|
2012-05-10 20:13:04 +00:00
|
|
|
with
|
2012-06-07 13:18:51 +00:00
|
|
|
.BR madvise (2),
|
2012-05-09 05:50:54 +00:00
|
|
|
ensuring that it will not be available
|
|
|
|
to the child after
|
|
|
|
.BR fork (2).
|
2008-02-11 10:38:24 +00:00
|
|
|
.LP
|
|
|
|
The
|
|
|
|
.B O_DIRECT
|
|
|
|
flag was introduced in SGI IRIX, where it has alignment
|
|
|
|
restrictions similar to those of Linux 2.4.
|
|
|
|
IRIX has also a
|
|
|
|
.BR fcntl (2)
|
|
|
|
call to query appropriate alignments, and sizes.
|
|
|
|
FreeBSD 4.x introduced
|
|
|
|
a flag of the same name, but without alignment restrictions.
|
|
|
|
.LP
|
|
|
|
.B O_DIRECT
|
|
|
|
support was added under Linux in kernel version 2.4.10.
|
|
|
|
Older Linux kernels simply ignore this flag.
|
2008-03-19 07:26:08 +00:00
|
|
|
Some file systems may not implement the flag and
|
2008-02-11 10:38:24 +00:00
|
|
|
.BR open ()
|
|
|
|
will fail with
|
|
|
|
.B EINVAL
|
|
|
|
if it is used.
|
|
|
|
.LP
|
|
|
|
Applications should avoid mixing
|
|
|
|
.B O_DIRECT
|
|
|
|
and normal I/O to the same file,
|
|
|
|
and especially to overlapping byte regions in the same file.
|
2008-03-19 07:26:08 +00:00
|
|
|
Even when the file system correctly handles the coherency issues in
|
2008-02-11 10:38:24 +00:00
|
|
|
this situation, overall I/O throughput is likely to be slower than
|
|
|
|
using either mode alone.
|
|
|
|
Likewise, applications should avoid mixing
|
|
|
|
.BR mmap (2)
|
|
|
|
of files with direct I/O to the same files.
|
|
|
|
.LP
|
|
|
|
The behaviour of
|
|
|
|
.B O_DIRECT
|
2008-03-19 07:26:08 +00:00
|
|
|
with NFS will differ from local file systems.
|
2008-02-11 10:38:24 +00:00
|
|
|
Older kernels, or
|
|
|
|
kernels configured in certain ways, may not support this combination.
|
|
|
|
The NFS protocol does not support passing the flag to the server, so
|
|
|
|
.B O_DIRECT
|
|
|
|
I/O will only bypass the page cache on the client; the server may
|
|
|
|
still cache the I/O.
|
|
|
|
The client asks the server to make the I/O
|
|
|
|
synchronous to preserve the synchronous semantics of
|
|
|
|
.BR O_DIRECT .
|
|
|
|
Some servers will perform poorly under these circumstances, especially
|
|
|
|
if the I/O size is small.
|
|
|
|
Some servers may also be configured to
|
|
|
|
lie to clients about the I/O having reached stable storage; this
|
|
|
|
will avoid the performance penalty at some risk to data integrity
|
|
|
|
in the event of server power failure.
|
|
|
|
The Linux NFS client places no alignment restrictions on
|
|
|
|
.B O_DIRECT
|
|
|
|
I/O.
|
|
|
|
.PP
|
|
|
|
In summary,
|
|
|
|
.B O_DIRECT
|
|
|
|
is a potentially powerful tool that should be used with caution.
|
|
|
|
It is recommended that applications treat use of
|
|
|
|
.B O_DIRECT
|
|
|
|
as a performance option which is disabled by default.
|
|
|
|
.PP
|
|
|
|
.RS
|
2004-11-03 13:51:07 +00:00
|
|
|
"The thing that has always disturbed me about O_DIRECT is that the whole
|
|
|
|
interface is just stupid, and was probably designed by a deranged monkey
|
intro.1, fork.2, futex.2, open.2, rename.2, select_tut.2, semop.2, spu_create.2, stat.2, netlink.3, random.3, scanf.3, shm_open.3, strftime.3, console.4, console_codes.4, sk98lin.4, st.4, bootparam.7, cpuset.7, credentials.7, man-pages.7, path_resolution.7, uri.7: Global fix: remove spaces around em-dash
Normal English typographical convention is not to have
spaces around em dashes.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2011-10-03 06:47:35 +00:00
|
|
|
on some serious mind-controlling substances."\(emLinus
|
2008-02-11 10:38:24 +00:00
|
|
|
.RE
|
|
|
|
.SH BUGS
|
2006-01-15 04:39:23 +00:00
|
|
|
Currently, it is not possible to enable signal-driven
|
|
|
|
I/O by specifying
|
|
|
|
.B O_ASYNC
|
2007-04-12 22:42:49 +00:00
|
|
|
when calling
|
2006-01-15 04:39:23 +00:00
|
|
|
.BR open ();
|
|
|
|
use
|
|
|
|
.BR fcntl (2)
|
|
|
|
to enable this flag.
|
2007-06-13 21:48:16 +00:00
|
|
|
.\" FIXME . Check bugzilla report on open(O_ASYNC)
|
2006-02-08 09:44:13 +00:00
|
|
|
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=5993
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH SEE ALSO
|
2008-05-13 11:29:39 +00:00
|
|
|
.BR chmod (2),
|
|
|
|
.BR chown (2),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR close (2),
|
2005-06-22 09:52:33 +00:00
|
|
|
.BR dup (2),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR fcntl (2),
|
|
|
|
.BR link (2),
|
2005-06-21 10:04:56 +00:00
|
|
|
.BR lseek (2),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR mknod (2),
|
2005-06-22 09:52:33 +00:00
|
|
|
.BR mmap (2),
|
2008-07-14 15:52:21 +00:00
|
|
|
.BR mount (2),
|
2006-03-06 04:36:33 +00:00
|
|
|
.BR openat (2),
|
2004-11-03 13:51:07 +00:00
|
|
|
.BR read (2),
|
|
|
|
.BR socket (2),
|
|
|
|
.BR stat (2),
|
|
|
|
.BR umask (2),
|
|
|
|
.BR unlink (2),
|
|
|
|
.BR write (2),
|
|
|
|
.BR fopen (3),
|
2008-07-14 15:52:21 +00:00
|
|
|
.BR fifo (7),
|
2008-06-11 21:50:53 +00:00
|
|
|
.BR path_resolution (7),
|
|
|
|
.BR symlink (7)
|