Re: gspawn(-win32): why helper?



Felix Kater writes:
 > I simply don't understand the need of the helper process. :-/

How would you implement the changing of workign directory (without
affecting other threads) or closing of file descriptors othewise?

(Not that there is any guarantee that all file open C file descriptors
will be closed in the child process: gspawn-win32-helper.c only closes
up to an arbitrary limit of 1000. And no Win32 file HANDLES are closed
at all, but if the parent's code has opened files using the Win32 API,
it hopefully understand to make them non-inheritable as well.)

 > a) if I launch a synchronous process -- then I even don't get a handle
 > in my hands to close, so there is no way to eventually make it become a
 > zombie,

What does "zombie" mean in Win32? Is there a wait() or waitpid()
system call?

 > b) if I launch an asynchronous process and the user doesn't want to
 > care for the pid handle -- then I can close the handle directly after
 > spawning.

Umm, so what?

 > So, in both cases no need for an intermediate process?

Feel free to open *specific* bug reports and submit patches.

--tml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]