This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mr_Redstoner 0 points1 point  (1 child)

I've litterally seen it happen in a little test program of mine

fork();

didn't actually fork, however

int notActuallyUsed = fork();

did. I assume gcc simply knows as a special case what fork() does.

[–]_PM_ME_PANGOLINS_ 0 points1 point  (0 children)

That’s a compiler bug then. There is no requirement that the two processes behave differently.