tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* question on process creation and termination
@ 2000-09-26 15:38 Daniel Monjar
  0 siblings, 0 replies; only message in thread
From: Daniel Monjar @ 2000-09-26 15:38 UTC (permalink / raw)
  To: tru64-unix-managers

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 <stdio.h>
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?

-- 
Daniel Monjar (mailto:dmonjar@orgtek.com)
"Meddle not in the affairs of dragons, 
 for you are crunchy and taste good with ketchup."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-09-26 15:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-26 15:38 question on process creation and termination Daniel Monjar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox