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

From: jackstinchcombe AT my-dejanews DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: I cant get spawning to work
Date: Sat, 07 Nov 1998 17:34:32 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 18
Message-ID: <7220b9$fkl$1@nnrp1.dejanews.com>
NNTP-Posting-Host: 206.18.101.151
X-Article-Creation-Date: Sat Nov 07 17:34:32 1998 GMT
X-Http-User-Agent: Mozilla/4.05 [en] (Win95; I ;Nav)
X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 206.18.101.151
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I can't get spawnl, spawnv, etc., to work. These functions always return -1.
I have tried numerous variants of the code below, but the same thing always
happens (ie it prints "It didn't work :("). The program im trying to spawn is
a functional compiled djgpp program, in the same directory as the one im
trying to spawn from.

What am I doing wrong?

#include <stdio.h>
#include <process.h>
int main(int argc, char *argv[])
{  if (spawnl(P_WAIT, "", "myexe.exe")==-1)
      printf ("It didn't work :(");
return 0;
 }

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

- Raw text -


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