int x = 0; int myPID; myPID = fork(); if (!myPID) { execv(argv[0], argv); goto ohno; } wait (NULL); goto theend; ohno: x = 1; theend: // the value of x here is 0, even if execv() fails, in which case i want this value of x to be 1