[Prev][Next][Index][Thread]
Re: exec system calls
On Sun, 20 Oct 1996, [ISO-8859-1] שמוליק פלינט wrote:
> hi
> i have this problem i can't solve that driving me crazy.
> whenever i use the exec system calls from C i get -1 end errno equals
> EFAULT (14)
> do you have any clue why that might happen or where can i found answers to
> this probelm?
> TIA
When I get system calls that give bad results, I look in the
kernel sources. If you cd to /usr/src/linux/kernel
and run:
grep EFAULT *.c You can get some starting information.
The older source code I have shows me that sys.c will
set errno to EFAULT when struct new_utsname * name is
empty. At this point, I would check the arguments you
are presenting to exec, to be sure that there is no NULL
argument. I don't know which of the exec's you used. If
that does not lead you to the flaw, you can trace the
calls backward.. even adding printk() statements and rebuilding
the kernel, in order to determine which possible section
of the sources is setting up the EFAULT. It might take an
hour, but if you stick with it, you can usually find the
problem because you all the information needed: the
source code... and YOU understand 'C'.
--randy
Randy Wright randy@ramat-negev.org.il
System Administrator - Ramat-Negev FreeNet
http://www.ramat-negev.org.il/
07-6572671 voice-telephone
References:
- exec system calls
- From: "=?ISO-8859-1?Q?=F9=EE=E5=EC=E9=F7_=F4=EC=E9=F0=E8?=" <shmulik@main.aquanet.co.il>