Re: fork/execv - how to get errno to the parent
- From: Douglas O'Neal <oneal@xxxxxxxxxxxx>
- Date: Fri, 24 Feb 2006 11:53:50 -0500
Kasper Dupont wrote:
Jordan Abel wrote:
On 2005-09-22, Kasper Dupont <kasperd@xxxxxxxxxxx> wrote:
What you must be aware of is that some of the exec functions
may actually call /bin/sh
System does this. none of the exec functions do.
What distribution are you using? I have been able to reproduce
this on Fedora Core, Source Mage, and FreeBSD. This is the
source code I used:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
char *c="foobar";
execlp(c,c,NULL);
perror(c);
return EXIT_FAILURE;
}
<snip>
Try changing foobar to sleep and rerunning your strace. sh is called
because foobar is a shell script.
Doug
.
- References:
- Re: fork/execv - how to get errno to the parent
- From: Jordan Abel
- Re: fork/execv - how to get errno to the parent
- Prev by Date: Re: fork/execv - how to get errno to the parent
- Next by Date: Re: Trolltech QT license question
- Previous by thread: Re: fork/execv - how to get errno to the parent
- Next by thread: Re: fork/execv - how to get errno to the parent
- Index(es):