Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ulimit(2) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

brk(2)

getrlimit(2)

write(2)

ulimit(2)






       ulimit(2)                                                  ulimit(2)


       NAME
             ulimit - get and set user limits

       SYNOPSIS
             #include <ulimit.h>
             long ulimit(int cmd, . . . /* newlimit */ );

       DESCRIPTION
             This function provides for control over process limits.  The
             cmd values available are:

             UL_SFILLIM     Set the regular file size limit of the process
                            to the value of newlimit, taken as a long.  Any
                            process may decrease this limit, but only a
                            process with the appropriate privilege may
                            increase the limit.

             UL_GFILLIM     Get the regular 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.

             UL_GMEMLIM     Get the maximum possible break value [see brk].

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

          Return Values
             On success, ulimit returns a non-negative value that depends
             on cmd as described above.  On failure, ulimit returns -1 and
             sets errno to identify the error.

          Errors
             In the following conditions, ulimit fails and sets errno to:

             EINVAL         The cmd argument is not valid.

             EPERM          An attempt was made to increase the process's
                            file size limit and the calling process does
                            not have the P_SYSOPS privilege.

       REFERENCES
             brk(2), getrlimit(2), write(2)




                           Copyright 1994 Novell, Inc.               Page 1













      ulimit(2)                                                  ulimit(2)


      NOTICES
            ulimit is effective in limiting the growth of regular files.
            Pipes are currently limited to {PIPE_MAX}.

            The getrlimit system call provides a more general interface
            for controlling process limits.

         Considerations for Threads Programming
            These resource limits are an attribute of the containing
            process and are shared by sibling threads.






































                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026