#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:53+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man2/fork.2:39 #, no-wrap msgid "FORK" msgstr "" #. type: TH #: man-pages/man2/fork.2:39 #, no-wrap msgid "2014-05-28" msgstr "" #. type: TH #: man-pages/man2/fork.2:39 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man2/fork.2:39 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man2/fork.2:40 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:42 msgid "fork - create a child process" msgstr "" #. type: SH #: man-pages/man2/fork.2:42 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:44 msgid "B<#include Eunistd.hE>" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:46 msgid "B" msgstr "" #. type: SH #: man-pages/man2/fork.2:46 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:52 msgid "" "B() creates a new process by duplicating the calling process. The " "new process, referred to as the I, is an exact duplicate of the " "calling process, referred to as the I, except for the following " "points:" msgstr "" #. type: IP #: man-pages/man2/fork.2:52 man-pages/man2/fork.2:56 man-pages/man2/fork.2:58 man-pages/man2/fork.2:62 man-pages/man2/fork.2:68 man-pages/man2/fork.2:71 man-pages/man2/fork.2:74 man-pages/man2/fork.2:82 man-pages/man2/fork.2:87 man-pages/man2/fork.2:99 man-pages/man2/fork.2:106 man-pages/man2/fork.2:112 man-pages/man2/fork.2:119 man-pages/man2/fork.2:125 man-pages/man2/fork.2:130 man-pages/man2/fork.2:138 man-pages/man2/fork.2:147 man-pages/man2/fork.2:161 man-pages/man2/fork.2:170 #, no-wrap msgid "*" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:56 msgid "" "The child has its own unique process ID, and this PID does not match the ID " "of any existing process group (B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:58 msgid "The child's parent process ID is the same as the parent's process ID." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:62 msgid "" "The child does not inherit its parent's memory locks (B(2), " "B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:68 msgid "" "Process resource utilizations (B(2)) and CPU time counters " "(B(2)) are reset to zero in the child." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:71 msgid "" "The child's set of pending signals is initially empty (B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:74 msgid "" "The child does not inherit semaphore adjustments from its parent " "(B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:82 msgid "" "The child does not inherit process-associated record locks from its parent " "(B(2)). (On the other hand, it does inherit B(2) open file " "description locks and B(2) locks from its parent.)" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:87 msgid "" "The child does not inherit timers from its parent (B(2), " "B(2), B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:94 msgid "" "The child does not inherit outstanding asynchronous I/O operations from its " "parent (B(3), B(3)), nor does it inherit any " "asynchronous I/O contexts from its parent (see B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:99 msgid "" "The process attributes in the preceding list are all specified in POSIX.1-" "2001. The parent and child also differ with respect to the following Linux-" "specific process attributes:" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:106 msgid "" "The child does not inherit directory change notifications (dnotify) from " "its parent (see the description of B in B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:112 msgid "" "The B(2) B setting is reset so that the child does " "not receive a signal when its parent terminates." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:119 msgid "" "The default timer slack value is set to the parent's current timer slack " "value. See the description of B in B(2)." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:125 msgid "" "Memory mappings that have been marked with the B(2) " "B flag are not inherited across a B()." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:130 msgid "" "The termination signal of the child is always B (see B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:136 msgid "" "The port access permission bits set by B(2) are not inherited by " "the child; the child must turn on any bits that it requires using " "B(2)." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:138 msgid "Note the following further points:" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:147 msgid "" "The child process is created with a single thread\\(emthe one that called " "B(). The entire virtual address space of the parent is replicated in " "the child, including the states of mutexes, condition variables, and other " "pthreads objects; the use of B(3) may be helpful for " "dealing with problems that this can cause." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:161 msgid "" "The child inherits copies of the parent's set of open file descriptors. " "Each file descriptor in the child refers to the same open file description " "(see B(2)) as the corresponding file descriptor in the parent. This " "means that the two descriptors share open file status flags, current file " "offset, and signal-driven I/O attributes (see the description of B " "and B in B(2))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:170 msgid "" "The child inherits copies of the parent's set of open message queue " "descriptors (see B(7)). Each descriptor in the child refers to " "the same open message queue description as the corresponding descriptor in " "the parent. This means that the two descriptors share the same flags " "(I)." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:178 msgid "" "The child inherits copies of the parent's set of open directory streams (see " "B(3)). POSIX.1-2001 says that the corresponding directory streams " "in the parent and child I share the directory stream positioning; on " "Linux/glibc they do not." msgstr "" #. type: SH #: man-pages/man2/fork.2:178 #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:185 msgid "" "On success, the PID of the child process is returned in the parent, and 0 is " "returned in the child. On failure, -1 is returned in the parent, no child " "process is created, and I is set appropriately." msgstr "" #. type: SH #: man-pages/man2/fork.2:185 #, no-wrap msgid "ERRORS" msgstr "" #. type: TP #: man-pages/man2/fork.2:186 man-pages/man2/fork.2:191 man-pages/man2/fork.2:209 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:191 msgid "" "B() cannot allocate sufficient memory to copy the parent's page " "tables and allocate a task structure for the child." msgstr "" #. NOTE! The following should match the description in pthread_create(3) #. type: Plain text #: man-pages/man2/fork.2:209 msgid "" "A system-imposed limit on the number of threads was encountered. There are " "a number of limits that may trigger this error: the B soft " "resource limit (set via B(2)), which limits the number of " "processes and threads for a real user ID, was reached; the kernel's system-" "wide limit on the number of processes and threads, I, was reached (see B(5)); or the maximum number of PIDs, " "I, was reached (see B(5))." msgstr "" #. type: Plain text #: man-pages/man2/fork.2:216 msgid "" "The caller is operating under the B scheduling policy and " "does not have the reset-on-fork flag set. See B(7)." msgstr "" #. type: TP #: man-pages/man2/fork.2:216 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:220 msgid "" "B() failed to allocate the necessary kernel structures because memory " "is tight." msgstr "" #. type: TP #: man-pages/man2/fork.2:220 #, no-wrap msgid "B" msgstr "" #. e.g., arm (optionally), blackfin, c6x, frv, h8300, microblaze, xtensa #. type: Plain text #: man-pages/man2/fork.2:226 msgid "" "B() is not supported on this platform (for example, hardware without " "a Memory-Management Unit)." msgstr "" #. type: SH #: man-pages/man2/fork.2:226 #, no-wrap msgid "CONFORMING TO" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:228 msgid "SVr4, 4.3BSD, POSIX.1-2001." msgstr "" #. type: SH #: man-pages/man2/fork.2:228 #, no-wrap msgid "NOTES" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:235 msgid "" "Under Linux, B() is implemented using copy-on-write pages, so the " "only penalty that it incurs is the time and memory required to duplicate the " "parent's page tables, and to create a unique task structure for the child." msgstr "" #. nptl/sysdeps/unix/sysv/linux/fork.c #. and does some magic to ensure that getpid(2) returns the right value. #. type: Plain text #: man-pages/man2/fork.2:259 msgid "" "Since version 2.3.3, rather than invoking the kernel's B() system " "call, the glibc B() wrapper that is provided as part of the NPTL " "threading implementation invokes B(2) with flags that provide the " "same effect as the traditional system call. (A call to B() is " "equivalent to a call to B(2) specifying I as just B." ") The glibc wrapper invokes any fork handlers that have been established " "using B(3)." msgstr "" #. type: SH #: man-pages/man2/fork.2:259 #, no-wrap msgid "EXAMPLE" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:264 msgid "See B(2) and B(2)." msgstr "" #. type: SH #: man-pages/man2/fork.2:264 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:275 msgid "" "B(2), B(2), B(2), B(2), B(2), " "B(2), B(2), B(3), B(7), B(7)" msgstr "" #. type: SH #: man-pages/man2/fork.2:275 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man2/fork.2:283 msgid "" "This page is part of release 3.70 of the Linux I project. A " "description of the project, information about reporting bugs, and the latest " "version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/" "." msgstr ""