https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85226
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- system is not part of GCC anyway, so this is the wrong place to report problems with it, but the answer is simple: system doesn't return a PID. It runs the command, waits for it to finish (so the child PID is no longer valid anyway) and then returns the "wait status" from the child as if by waitpid.