delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/07/12:57:06

Date: Sat, 7 Nov 1998 12:56:58 -0500 (EST)
Message-Id: <199811071756.MAA07051@indy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <7220b9$fkl$1@nnrp1.dejanews.com>
(jackstinchcombe AT my-dejanews DOT com)
Subject: Re: I cant get spawning to work
Reply-To: djgpp AT delorie DOT com

> {  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)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019