ulimit(2) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

ulimit(2)

ulimit(2)                        System Calls                        ulimit(2)

NAME
       ulimit - get and set process limits

SYNOPSIS
       #include <ulimit.h>

       long ulimit(int cmd, /* newlimit */...);

DESCRIPTION
       The  ulimit()  function provides for control over process limits. It is
       provided for compatibility with older System V systems and is not  rec‐
       ommended for use in new software.


       The cmd values, defined in <ulimit.h>, include:

       UL_GETFSIZE    Return  the  soft  file  size  limit of the process. The
                      limit is in units of 512-byte blocks and is inherited by
                      child processes. Files of any size can be read. The  re‐
                      turn  value  is  the  integer part of the soft file size
                      limit divided by 512. If the  result  cannot  be  repre‐
                      sented as a long int, the result is unspecified.


       UL_SETFSIZE    Set the hard and soft file size limits for output opera‐
                      tions  of  the  process to the value of the second argu‐
                      ment, taken as a long int. Any process may decrease  its
                      own  hard  limit,  but  only  a process with appropriate
                      privileges may increase the limit.  The  new  file  size
                      limit  is  returned.  The hard and soft file size limits
                      are set to the specified value multiplied by 512. If the
                      result would overflow an rlim_t, the actual value set is
                      unspecified.


       UL_GMEMLIM     Get the maximum possible break value (see brk(2)).


       UL_GDESLIM     Get the current value of  the  maximum  number  of  open
                      files per process configured in the system.


RETURN VALUES
       Upon successful completion, ulimit() returns the value of the requested
       limit.  Otherwise,  −1 is returned, the limit is not changed, and errno
       is set to indicate the error.

ERRORS
       The ulimit() function will fail if:

       EINVAL    The cmd argument is not valid.


       EPERM     A process that has not asserted  {PRIV_SYS_RESOURCE}  in  its
                 effective set is trying to increase its file size limit.


USAGE
       Since  all  return values are permissible in a successful situation, an
       application wishing to check for error situations should set  errno  to
       0,  then  call  ulimit(),  and if it returns −1, check if errno is non-
       zero.


       The standard getrlimit() and setrlimit() functions,  and  the  Solaris-
       specific  resource  control  facility, provide a more general interface
       for controlling process limits, and are preferred  over  ulimit().  See
       getrlimit(2) and resource-controls(7).

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ StandardSee below.



       The POSIX.1-2008 and XPG7 standards have declared ulimit() to be  Obso‐
       lescent, and it may be removed from future versions of these standards.

SEE ALSO
       brk(2), getrlimit(2), write(2), privileges(7), attributes(7), resource-
       controls(7), standards(7)

HISTORY
       The  ulimit() function has been included in all Sun and Oracle releases
       of Solaris.

Oracle Solaris 11.4               30 Jan 2023                        ulimit(2)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3