telnetd/libtelnet/vfork.and.run.h
Stephen Heumann 8a3b1e25cd When forking the child process, wait until the child has exec'd before continuing in the parent.
Also includes a few other changes for safety, e.g. making the child exit via QuitGS rather than exit() or _exit().

The vfork_and_run() routine is based on code from my port of hush.
2016-01-09 12:46:38 -06:00

2 lines
64 B
C

pid_t vfork_and_run(void (*fn)(void*) /*NORETURN*/, void *arg);