www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/26/12:59:28

From: DKhosla AT Compaq DOT com (Khosla, Deepak)
Subject: RE: execvp returns after exec.....
26 Sep 1997 12:59:28 -0700 :
Message-ID: <c=US%a=_%p=COMPAQ%l=EXCHOU-CA0201-970926193537Z-1145.cygnus.gnu-win32@exchou-conn01.im.hou.compaq.com>
Mime-Version: 1.0
To: "'Sergey Okhapkin'" <sos AT prospect DOT com DOT ru>
Cc: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>

Yes, I looked into it and spawn with a wait would do the trick. (It 
appears exec is some form of asynchronous spawn). However, I have one 
problem; spawn will only take 1K max size argument list and in some 
cases this is not enough. Any ideas on how to work around that?

Regards

Deepak Khosla
281-514-9234
DKhosla AT compaq DOT com

-----Original Message-----
From:	Sergey Okhapkin [SMTP:sos AT prospect DOT com DOT ru]
Sent:	Friday, September 26, 1997 1:24 PM
To:	Khosla, Deepak
Subject:	RE: execvp returns after exec.....

Khosla, Deepak wrote:
>
> mysleep.exe -s 10 will cause mysleep to wait 10 secs before printing 
a
> message out. What I observe is that as soon as the execvp is done,
> control returns to my DOS prompt and I can continue to run commands 
as
> if the process was done. 10 secs later I get a message from 
mysleep.
> The output is shown below (and I noticed that the PID of the execd
> process is different from the original process). Does anyone know 
why
> this happens and is there a way for me to change the behavior to 
where
> control does not return until mysleep is done?

Use spawn() instead of exec(). Pids differs because getpid in mingw
environment returns Win32 pid, and you have two _different_ win32
processes.

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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