{
    "mode": "pydoc",
    "parameter": "_posixsubprocess",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/_posixsubprocess/json",
    "generated": "2026-06-02T14:19:02Z",
    "sections": {
        "NAME": {
            "content": "posixsubprocess - A POSIX helper for the subprocess module.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "fork_exec",
                    "content": "forkexec(args, executablelist, closefds, passfds, cwd, env,\np2cread, p2cwrite, c2pread, c2pwrite,\nerrread, errwrite, errpiperead, errpipewrite,\nrestoresignals, callsetsid,\ngid, groupslist, uid,\npreexecfn)\n\nForks a child process, closes parent file descriptors as appropriate in the\nchild and dups the few that are needed before calling exec() in the child\nprocess.\n\nIf closefds is true, close file descriptors 3 and higher, except those listed\nin the sorted tuple passfds.\n\nThe preexecfn, if supplied, will be called immediately before closing file\ndescriptors and exec.\nWARNING: preexecfn is NOT SAFE if your application uses threads.\nIt may trigger infrequent, difficult to debug deadlocks.\n\nIf an error occurs in the child process before the exec, it is\nserialized and written to the errpipewrite fd per subprocess.py.\n\nReturns: the child process's PID.\n\nRaises: Only on an error in the parent process.\n"
                }
            ]
        },
        "FILE": {
            "content": "(built-in)\n\n",
            "subsections": []
        }
    },
    "summary": "posixsubprocess - A POSIX helper for the subprocess module.",
    "flags": [],
    "examples": [],
    "see_also": []
}