www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/21/12:57:37

Date: Tue, 21 Nov 1995 17:08:01 +0300
From: "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>
To: A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk, DJGPP AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Trouble spawning

> From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
> Date: Tue, 21 Nov 1995 11:16:45 GMT
> 
>   I have a Gnu C++ program that calls PKUNZIP.EXE thus:-
>     k=spawnl(P_WAIT,UNZIP,ZIPWF,0);
>   where P_WAIT is defined in #include<process.h>, UNZIP is a char* -> the full
> pathname of my copy of PKUNZIP.EXE, ZIPWF is a char* -> the full pathname of
> the zipfile that I want to unzip. But always when called thus, PKUNZIP behaves
> as it behaves when I call it directly from DOS without any arguments.
> 
spawnl pass the parameter list to called program as argv, so
ZIPWF goes to argv[0], being the name of program. If you want to pass
it as the first parameter, use spawnl(P_WAIT,UNZIP,UNZIP,ZIPWF,NULL);
---
Alexander Lukyanov
lav AT video DOT yars DOT free DOT net

- Raw text -


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