Message-ID: <364DE2CD.70D15563@nt.com> Date: Sat, 14 Nov 1998 15:06:37 -0500 From: "Ian Chapman" Organization: Nortel X-Mailer: Mozilla 4.06 [en] (Win95; I) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: I cant get spawning to work References: <199811071756 DOT MAA07051 AT indy DOT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Hi DJ, I had the same problem and I gave up and used I think it was system. I'd never have guessed the double "myexe.exe" from info. Guess I need reading lessons. Regards Ian. DJ Delorie wrote: > > > { if (spawnl(P_WAIT, "", "myexe.exe")==-1) > > The second argument is the program to run. Obviously, "" won't work. > The third argument, where you are putting the program name, is only > used to generate the program's argv[0] and may be anything you want. > In addition, spawnl() requires that the final argument be NULL, > so that it knows where the end of the list of parameters is. Your > example should be like this: > > spawnl(P_WAIT, "myexe.exe", "myexe.exe", NULL)