umount(2) - phpMan

Command: man perldoc info search(apropos)  

UMOUNT(2)                  Linux Programmer's Manual                 UMOUNT(2)

       umount, umount2 - unmount file system

       #include <sys/mount.h>

       int umount(const char *target);

       int umount2(const char *target, int flags);

       umount()  and  umount2() remove the attachment of the (topmost) file system mounted
       on target.

       Appropriate privilege (Linux: the CAP_SYS_ADMIN capability) is required to  unmount
       file systems.

       Linux  2.1.116  added  the  umount2() system call, which, like umount(), unmounts a
       target, but allows additional flags controlling the behavior of the operation:

       MNT_FORCE (since Linux 2.1.116)
              Force unmount even if busy.  This  can  cause  data  loss.   (Only  for  NFS

       MNT_DETACH (since Linux 2.4.11)
              Perform  a  lazy unmount: make the mount point unavailable for new accesses,
              and actually perform the unmount when the mount point ceases to be busy.

       MNT_EXPIRE (since Linux 2.6.8)
              Mark the mount point as expired.  If a mount point is not currently in  use,
              then  an  initial  call  to  umount2()  with  this flag fails with the error
              EAGAIN, but marks the mount point  as  expired.   The  mount  point  remains
              expired  as  long  as  it isn't accessed by any process.  A second umount2()
              call specifying MNT_EXPIRE unmounts an expired mount point.  This flag  can-
              not be specified with either MNT_FORCE or MNT_DETACH.

       UMOUNT_NOFOLLOW (since Linux 2.6.34)
              Don't  dereference  target if it is a symbolic link.  This flag allows secu-
              rity problems to be avoided in set-user-ID-root programs that allow unprivi-
              leged users to unmount file systems.

       On success, zero is returned.  On error, -1 is returned, and errno is set appropri-

       The error values given below result from filesystem type independent errors.   Each
       filesystem  type may have its own special errors and its own special behavior.  See
       the kernel source code for details.

       EAGAIN A call to umount2() specifying MNT_EXPIRE successfully marked an unbusy file
              system as expired.

       EBUSY  target could not be unmounted because it is busy.

       EFAULT target points outside the user address space.

       EINVAL target  is  not a mount point.  Or, umount2() was called with MNT_EXPIRE and
              either MNT_DETACH or MNT_FORCE.

              A pathname was longer than MAXPATHLEN.

       ENOENT A pathname was empty or had a nonexistent component.

       ENOMEM The kernel could not allocate a free page to copy filenames or data into.

       EPERM  The caller does not have the required privileges.

       These functions are Linux-specific and should not be used in programs  intended  to
       be portable.

       The  original umount() function was called as umount(device) and would return ENOT-
       BLK when called with something other than a block device.  In Linux 0.98p4  a  call
       umount(dir) was added, in order to support anonymous devices.  In Linux 2.3.99-pre7
       the call umount(device) was removed, leaving only umount(dir)  (since  now  devices
       can  be mounted in more than one place, so specifying the device does not suffice).

       mount(2), path_resolution(7), mount(8), umount(8)

       This page is part of release 3.22 of the Linux man-pages project.  A description of
       the  project, and information about reporting bugs, can be found at http://www.ker-

Linux                             2008-10-06                         UMOUNT(2)

Generated by $Id: phpMan.php,v 4.55 2007/09/05 04:42:51 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2017-12-16 01:18 @ CrawledBy CCBot/2.0 (
Valid XHTML 1.0!Valid CSS!