saghul / pyuv

Python interface for libuv
https://pyuv.readthedocs.io
MIT License
1.12k stars 105 forks source link

preexec_fn on Process.spawn #255

Closed crdoconnor closed 6 years ago

crdoconnor commented 6 years ago

Is it possible to somehow do preexec_fn on process.Spawn?

I'm trying to spawn a new process in a new process group - i.e. preexec_fn=os.setpgrp

saghul commented 6 years ago

Nope, it's not possible as libuv provides no hook for it. You can specify the desired group when calling spawn though!