From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97014980403495.tru64-unix-managers.marc@archive.invalid> From: Daniel Monjar Date: Thu, 28 Sep 2000 14:04:33 +0000 To: tru64-unix-managers Subject: SUMMARY: on process creation and termination X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=97014980403495 Not one person got ugly because it was a homework related question! thanks... Lot's of good suggestions but I think the most like one, that was confirmed with a Sun man page, is that Sun sneaks a wait() call into the exit() that is implicitly call at program termination. Original: ----- Forwarded message from Daniel Monjar ----- This is vaguely DEC Unix related and, yes, it is derived from a homework question (my wife's not mine). But something _is_ going on that, when answered, will further my knowledge so: The subject is process synchronization. They have a simple program that looks like this: #include int main() { int x; printf("PID %d initial process \n", getpid() ); x = fork(); printf("PID %d terminates.\n", getpid() ); } Parent tells its pid, creates a child and then both child and parent display their pid and exits. When run on a Sun machine the parent doesn't exit until the child is done. When I run it on Intel Linux, Alpha Tru64 and Alpha OpenBSD the parent terminates before the child. What is the Sun doing differently than the others? ----- End forwarded message ----- -- Daniel Monjar (mailto:dmonjar@orgtek.com) "Meddle not in the affairs of dragons, for you are crunchy and taste good with ketchup."