Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!cmcl2!phri!marob!daveh From: daveh@marob.masa.com (Dave Hammond) Newsgroups: comp.unix.xenix Subject: Re: Help with execl Keywords: execl error? Message-ID: <251031D1.4B47@marob.masa.com> Date: 14 Sep 89 23:18:40 GMT References: <1049@polari.UUCP> Reply-To: daveh@marob.masa.com (Dave Hammond) Organization: ESCC, New York City Lines: 22 In article <1049@polari.UUCP> corwin@polari.UUCP (Don Glover) writes: > >I have a program that I have just compiled, in it does >execl(emprog[1],"Empire",cnumbuf,"","1","\0377",0); >when run it returns a -1 and errno is set to 14. this error is defined >as EFAULT Bad Address, for the life of me I can not figure out why I am >getting this. I have printf'd all the arguements and they look fine. > >Any suggestions will be appreciated. I am doing this on 286 xenix 2.2.3 >with the 2.2.1 development system. The 286 will segment fault every time if null is not cast properly. Try casting the terminating null arg to (char *): execl(emprog[1],"Empire",cnumbuf,"","1","\0377",(char *)0); BTW, I'm curious about the "\0377" arg. Does empire have a command line option which takes a 1 char string with -1 as its contents ? -- Dave Hammond daveh@marob.masa.com