This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: execvp returns after exec.....


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@compaq.com

-----Original Message-----
From:	Sergey Okhapkin [SMTP:sos@prospect.com.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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]