Subject: RE: execvp returns after exec.....
From: [email-masked] (Khosla, Deepak)

26 Sep 1997 12:59:28 -0700
Message-ID: <c=US%a=_%p=COMPAQ%l=[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: "'Sergey Okhapkin'" <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>

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
[email-masked]

-----Original Message-----
From:	Sergey Okhapkin [SMTP:[email-masked]]
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
"[email-masked]" with one line of text: "help".