This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: system() fails on pristine Windows systems


Archie Warnock wrote:

> > You could fork() and exec(), or just call one of the spawn() family of
> > functions.  This is all open source you know, you could look and see how
> > system() is implemented in winsup/cygwin/syscalls.cc.
> 
> I'll have to look and see there.  The fork()/exec()/spawn() functions
> don't quite do what I need, though.

system() is just a wrapper around spawnvp().  If spawn() isn't what you
want then neither is system().  spawn() does not necessarily replace the
current process (_P_OVERLAY), it can also start and optionally wait for
a subprocess (_P_WAIT, _P_NOWAIT, _P_DETACH).

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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