Re: system_exec()
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jul 15, 2003
- 538 views
----- Original Message ----- From: "Pete Lomax" <petelomax at blueyonder.co.uk> > > > On Fri, 11 Jul 2003 16:03:27 +0200, Juergen Luethje <j.lue at gmx.de> > wrote: > > >However, since I came across this issue, I'd like to know, whether or > >not system() always calls another program asynchronously, and > >system_exc() always does this synchronously. Just because I'd like to > >know as much as possible about "my" programming language. > > > >> Can you use the win api? > > > >Yes. As I mentioned, I have almost finished writing a routine, that > >seems to be something like a self-written system_exec() function. > >It uses the Win Api functions CreateProcess() and WaitForSingleObject(). > >But if system_exec() has the same functionality, why use a self-written > >function instead? > > I've just remembered, I nicked "w32Func(jJumpto" from rundemos.exw > (the one that comes with win32lib) for use in MEditor, I think it got > rid of an annoying dos window briefly appearing when using system(). And in rundemos.exw, I nicked that "jJumpto = define_c_func(lib,"ShellExecuteA"...", (and the "Jump_to" procedure that uses it), from Wolfgang Fritz, who in turn got it from someone known as "DaJaRo". :) Dan Moyer > > AFAIK, system_exec() always waits for the command to complete before > returning the exit code from the program. > > Pete > > > > TOPICA - Start your own email discussion group. FREE! >