PyDocs

Nav

Generic Operating System Services

posix_spawn

os

function · Added in 3.8Unixnot WASInot Androidnot iOS
  • posix_spawn(path, argv, env, *, file_actions=None, setpgroup=None, resetids=False, setsid=False, setsigmask=(), setsigdef=(), scheduler=None)
Execute the program specified by path in a new process.

path
  Path of executable file.
argv
  Tuple or list of strings.
env
  Dictionary of strings mapping to strings.
file_actions
  A sequence of file action tuples.
setpgroup
  The pgroup to use with the POSIX_SPAWN_SETPGROUP flag.
resetids
  If the value is `true` the POSIX_SPAWN_RESETIDS will be activated.
setsid
  If the value is `true` the POSIX_SPAWN_SETSID or POSIX_SPAWN_SETSID_NP
  will be activated.
setsigmask
  The sigmask to use with the POSIX_SPAWN_SETSIGMASK flag.
setsigdef
  The sigmask to use with the POSIX_SPAWN_SETSIGDEF flag.
scheduler
  A tuple with the scheduler policy (optional) and parameters.
Changed in 3.13
  • 3.13: env parameter accepts None. os.POSIX_SPAWN_CLOSEFROM is available on platforms where posix_spawn_file_actions_addclosefrom_np() exists.
0 Examples
No examples for os/posix_spawn.
See Also
No see-alsos for os/posix_spawn
0 Notes
No notes for posix_spawn