Issue 36619: when is os.posix_spawn(setsid=True) safe? (original) (raw)
Maybe we need to expose an object in the os module to list which parameters are supported. setsid is not argument, but scheduler is another argument. There is also a discussion to add another argument to os.posix_spawn() to specify the working directly: it's not possible on all platforms neither.
Currently, there are os.supports_* constants like os.supports_dir_fd (set of function names). But I would prefer to have an object just for posix_spawn. Maybe:
os.supported_posix_spawn_args = ('file_actions', setpgroup', 'resetids', 'setsid', 'setsigmark', 'setsigdef', 'scheduler')
The value would depend depending on the platform.