comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <matsw@mail.com>
Subject: Re: fork; execve --> defunct process.
Date: 2000/01/18
Date: 2000-01-18T09:34:15+00:00	[thread overview]
Message-ID: <38843392.FBEA70CB@mail.com> (raw)
In-Reply-To: 388414AD.E4D4C00D@mail.utexas.edu

"Bobby D. Bryant" wrote:
> 
> I am trying to get a program to start a second job.  I import fork() and
> execve() from C, and the calls apparently work OK (i.e., the fork
> returns a legitimate PID, and the execve returns a non-negative status).

execve never returns if it succeeds. What are you doing between fork and
execve in the child ?

> However, the child process immediately(?) goes into "defunct" status.
> For example, if I try to run the testgtk program, the program's GUI
> never pops up, and a ps x shows:

defunct means that the process is finished, but its parent does not know
yet. To avoid defunct processes, you must do a waitpid for the child in
the parent.




  parent reply	other threads:[~2000-01-18  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-18  0:00 fork; execve --> defunct process Bobby D. Bryant
2000-01-18  0:00 ` Mats Weber
2000-01-18  0:00 ` Mats Weber [this message]
2000-01-18  0:00   ` Bobby D. Bryant
2000-01-19  0:00     ` Mats Weber
2000-01-21  0:00     ` Robert A Duff
2000-01-22  0:00       ` Bobby D. Bryant
2000-01-19  0:00 ` Mario Klebsch
replies disabled

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