in reply to does system() return a pid?

On Windows and only there, the special calling convention system(1, ...) spawns a process and returns immediately. The child process's PID is returned.

All the other ways of calling system wait for the child to finish and reaps it. It would make no sense for them to return the PID of a process that no longer exists, so they do not return the child's PID.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.