3 ms·
How many non-unixes do have fork_without_exec()?
by wruza 10y ago
How many non-unixes do have fork_without_exec()?
- pjmlp 10y agoMost non-UNIX OSes only have exec(), not fork(). Hence why fork() is just kind-of implemented on their POSIX compatibility layers. In UNIX it is only an issue, because IEEE doesn't want to set in stone in POSIX how threads, signals and processes should interact, due to the way threads were added to UNIX.
- cperciva 10y agoNon-unix systems don't have exec; they have spawn.
- the_mitsuhiko 10y agoWindows has exec.
- wruza 10y agoExec is substitution of current process with new image without closing fds or changing pid. Which winapi function does that?
- the_mitsuhiko 10y ago_wexec and friends. It internally uses CreateProcess obviously.
- cperciva 10y agoRight, but it's not used in the sense of fork+exec. I should have said that Windows doesn't only have exec, it has spawn too.
- pjmlp 10y agoYeah, sure. I always think of spawn as a plain wrapper exec/fork, hence why I wrote it like that, but you are right correcting me.