comp.lang.ada
 help / color / mirror / Atom feed
From: "Bobby D. Bryant" <bdbryant@mail.utexas.edu>
Subject: Re: fork; execve --> defunct process.
Date: 2000/01/18
Date: 2000-01-19T00:15:01+00:00	[thread overview]
Message-ID: <3885024F.E13C3561@mail.utexas.edu> (raw)
In-Reply-To: 38843392.FBEA70CB@mail.com

Mats Weber wrote:

> execve never returns if it succeeds.

That's fine.


> What are you doing between fork and
> execve in the child ?

Nothing except check for PID = 0, plus whatever overhead is involved in a
function call, since I've got everything under wrappers.


> > 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.

Fine, but that's not my problem; I'll clean up the completed child processes
iff I ever get them to run correctly.

My problem is: why are the children going defunct immediately, rather than
running the requested programs?  I am getting core files for them, but they
should not be bombing off, since they include programs that run well on their
own (Electric Eyes, testgtk, etc.).

The child process is created, execve returns a non-negative status, and the
child process picks up the name of the requested program, but it apparently
cores out before it actually does anything.

Has anyone here used execve from Ada?  Is there a special trick required to
get it to work?  Does the child process get into a confused state when execve
tries to have it jump out of the middle of a running Ada program?  I.e., are
there leftover structures from Ada's run-time checking and/or task management
system that are not cleanly erased when execve is called?  (I'm not
explicitly using tasks, but I assume the run-time infrastructure is there
anyway.)

Thanks,

Bobby Bryant
Austin, Texas






  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
2000-01-18  0:00   ` Bobby D. Bryant [this message]
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