Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.lang.c Subject: Re: execl()'ing batch files in DOS Message-ID: <1649@auspex.auspex.com> Date: 18 May 89 16:57:02 GMT References: <302@ohs.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 20 > execl("\command.com", "tryit.bat", NULL); Oh, and as long as you're fixing this statement as per the other comments, change "NULL" to "(char *)NULL". NULL may be defined, at present, so as to make the code work without the cast, but the code isn't correct without it; put the cast in anyway, so that: 1) you get into the habit of doing it, so that your code works on systems where NULL *isn't* defined so as to make it work; 2) your code is protected against changes to the environment that might make it no longer work. (No, function prototypes won't fix this case, since "execl" needs a prototype like: int execl(char *, ...); and the NULL matches the "...", so the compiler has no idea that an actual argument of type "char *" is needed here.)