Philippe Hamel
2003-10-23 15:04:53 UTC
Hi all.
Here's the call
##########################################################################
pid_t pid;
if ( ( pid = fork() ) < 0 )
{
printf("failed\n");
}
else
{
if ( !pid )
{
execl("execname", "execname", strVar1, strVar2, strVar3,
strVar4, NULL);
}
}
#############################################################################
I'm running this on OpenServer 5.0.6, compiled with gcc, here's the
version
# gcc -v
Reading specs from /usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Everything runs fine, but when the child process is done, there's
always a "defunct" process left. And they add up and end up eating a
lot of ressources.
How do I fix that?
Thank you!
Philippe
Here's the call
##########################################################################
pid_t pid;
if ( ( pid = fork() ) < 0 )
{
printf("failed\n");
}
else
{
if ( !pid )
{
execl("execname", "execname", strVar1, strVar2, strVar3,
strVar4, NULL);
}
}
#############################################################################
I'm running this on OpenServer 5.0.6, compiled with gcc, here's the
version
# gcc -v
Reading specs from /usr/local/lib/gcc-lib/i386-pc-sco3.2v5.0.5/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Everything runs fine, but when the child process is done, there's
always a "defunct" process left. And they add up and end up eating a
lot of ressources.
How do I fix that?
Thank you!
Philippe