Subject: System(command) call returns immediately, command still running
From: "Robert O. Morris" <[email-masked]>
To: <[email-masked]>
Cc: "Distributed Oceanographic Data Server" <[email-masked]>, "Robert Morris" <[email-masked]>
Date: Mon, 19 Jul 1999 07:21:07 -0700

Hello Cygwin mailing list participants !

I have a problem with the cygwin run-time environment
under a common circumstance and was hoping someone
in the mailing list has some ideas regarding this.

main() { system(command); } works fine, however
when I run a similiar instruction from a dll
accessed from a non-cygwin application - I can
see the "command" run in the background even
after the .dll code I invoked is over and done
with.

I think this is related to the problems I have
using stdin, stdout, stderr and other general
problems with the run-time environment in such
a situation.  The other problems, I re-coded to
work around.  This problem - I don't see the
solution.  Fork/exec() is not the way to go with
me.  Pipe() won't work if std* is unusuable.
I think system() was my last option.  I do have
another work around, but it is such a hack
it makes me choke and probably won't be practical.

I want the run-time to know enough that when
system(command) spawns command - it knows to wait
until command finishes before returning.

I've included the cmex script which contains
the dll initialization code also.

Thank You !

Rob Morris

--
Want to unsubscribe from this list?
Send a message to [email-masked]