# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-06-01 05:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "fork" msgstr "" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.8" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "fork - create a child process" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<#include Eunistd.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B\n" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B() creates a new process by duplicating the calling process. The " "new process is referred to as the I process. The calling process is " "referred to as the I process." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child process and the parent process run in separate memory spaces. At " "the time of B() both memory spaces have the same content. Memory " "writes, file mappings (B(2)), and unmappings (B(2)) performed " "by one of the processes do not affect the other." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child process is an exact duplicate of the parent process except for the " "following points:" msgstr "" #. type: IP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "\\[bu]" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child has its own unique process ID, and this PID does not match the ID " "of any existing process group (B(2)) or session." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The child's parent process ID is the same as the parent's process ID." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child does not inherit its parent's memory locks (B(2), " "B(2))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Process resource utilizations (B(2)) and CPU time counters " "(B(2)) are reset to zero in the child." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child's set of pending signals is initially empty (B(2))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child does not inherit semaphore adjustments from its parent " "(B(2))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child does not inherit timers from its parent (B(2), " "B(2), B(2))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The process attributes in the preceding list are all specified in POSIX.1. " "The parent and child also differ with respect to the following Linux-" "specific process attributes:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Memory mappings that have been marked with the B(2) " "B flag are not inherited across a B()." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Memory in address ranges that have been marked with the B(2) " "B flag is zeroed in the child after a B(). (The " "B setting remains in place for those address ranges in the " "child.)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The termination signal of the child is always B (see B(2))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Note the following further points:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child process is created with a single thread\\[em]the 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "After a B() in a multithreaded program, the child can safely call " "only async-signal-safe functions (see B(7)) until such time " "as it calls B(2)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 file descriptors share open file status flags, file " "offset, and signal-driven I/O attributes (see the description of B " "and B in B(2))." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child inherits copies of the parent's set of open message queue " "descriptors (see B(7)). Each file descriptor in the child " "refers to the same open message queue description as the corresponding file " "descriptor in the parent. This means that the two file descriptors share " "the same flags (I)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The child inherits copies of the parent's set of open directory streams (see " "B(3)). POSIX.1 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 to indicate the error." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. NOTE! The following should match the description in pthread_create(3) #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A system-imposed limit on the number of threads was encountered. There are " "a number of limits that may trigger this error:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "the B soft resource limit (set via B(2)), which " "limits the number of processes and threads for a real user ID, was reached;" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "the kernel's system-wide limit on the number of processes and threads, I, was reached (see B(5));" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "the maximum number of PIDs, I, was reached (see " "B(5)); or" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "the PID limit (I) imposed by the cgroup \"process number\" (PIDs) " "controller was reached." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B() failed to allocate the necessary kernel structures because memory " "is tight." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "An attempt was made to create a child process in a PID namespace whose " "\"init\" process has terminated. See B(7)." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. e.g., arm (optionally), blackfin, c6x, frv, h8300, microblaze, xtensa #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B() is not supported on this platform (for example, hardware without " "a Memory-Management Unit)." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B (since Linux 2.6.17)" msgstr "" #. commit 4a2c7a7837da1b91468e50426066d988050e4d56 #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "System call was interrupted by a signal and will be restarted. (This can be " "seen only during a trace.)" msgstr "" #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "C library/kernel differences" msgstr "" #. nptl/sysdeps/unix/sysv/linux/fork.c #. and does some magic to ensure that getpid(2) returns the right value. #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Since glibc 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 #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2008." msgstr "" #. type: SH #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2001, SVr4, 4.3BSD." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed 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 "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "See B(2) and B(2) for more examples." msgstr "" #. type: Plain text #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "" "#include Esignal.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/types.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " pid_t pid;\n" "\\&\n" " if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {\n" " perror(\"signal\");\n" " exit(EXIT_FAILURE);\n" " }\n" " pid = fork();\n" " switch (pid) {\n" " case -1:\n" " perror(\"fork\");\n" " exit(EXIT_FAILURE);\n" " case 0:\n" " puts(\"Child exiting.\");\n" " exit(EXIT_SUCCESS);\n" " default:\n" " printf(\"Child is PID %jd\\en\", (intmax_t) pid);\n" " puts(\"Parent exiting.\");\n" " exit(EXIT_SUCCESS);\n" " }\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B(2), B(2), B(2), B(2), B(2), " "B(2), B(2), B(3), B(3), " "B(7), B(7)" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "2023-02-05" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "" #. type: Plain text #: debian-bookworm msgid "POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD." msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "#include Esignal.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "int\n" "main(void)\n" "{\n" " pid_t pid;\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" " if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {\n" " perror(\"signal\");\n" " exit(EXIT_FAILURE);\n" " }\n" " pid = fork();\n" " switch (pid) {\n" " case -1:\n" " perror(\"fork\");\n" " exit(EXIT_FAILURE);\n" " case 0:\n" " puts(\"Child exiting.\");\n" " exit(EXIT_SUCCESS);\n" " default:\n" " printf(\"Child is PID %jd\\en\", (intmax_t) pid);\n" " puts(\"Parent exiting.\");\n" " exit(EXIT_SUCCESS);\n" " }\n" "}\n" msgstr "" #. type: TH #: fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "" #. type: TH #: fedora-40 mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "" #. type: Plain text #: fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "" "#include Esignal.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " pid_t pid;\n" "\\&\n" " if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {\n" " perror(\"signal\");\n" " exit(EXIT_FAILURE);\n" " }\n" " pid = fork();\n" " switch (pid) {\n" " case -1:\n" " perror(\"fork\");\n" " exit(EXIT_FAILURE);\n" " case 0:\n" " puts(\"Child exiting.\");\n" " exit(EXIT_SUCCESS);\n" " default:\n" " printf(\"Child is PID %jd\\en\", (intmax_t) pid);\n" " puts(\"Parent exiting.\");\n" " exit(EXIT_SUCCESS);\n" " }\n" "}\n" msgstr "" #. type: TH #: fedora-rawhide #, no-wrap msgid "Linux man-pages 6.7" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr "" #. type: TH #: opensuse-tumbleweed #, no-wrap msgid "Linux man-pages (unreleased)" msgstr ""