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: spawn and wait?


Christopher Faylor wrote:
> Actually if you are running a recent coolview, then I believe that Sergey
> has made cwait and wait interchangeable.

Yes, you're absolutely right. Here is an extract from spawn code:
  else if ((mode == _P_NOWAIT) || (mode == _P_NOWAITO))
    {
      res = pid;
    }

  CloseHandle (pi.hThread);
  return (int) res;

And cwait implementation:

extern "C"
int
cwait (int *result, int pid, int)
{
  return waitpid (pid, result, 0);
}

In original b18 cygwin.dll spawn(_P_NOWAIT) returned win32 child process's handle and cwait() waited on that handle.

-- 
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]