#include #include #include #include int main(void) { volatile double x = 1; register double y = 2*x; fprintf(stderr, "before %f\n", y); switch (fork()) { case -1: err(1, "fork"); case 0: fprintf(stderr, "child %f\n", y); return 0; default: fprintf(stderr, "parent %f\n", y); return 0; } }