Re: system_exec()

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Pete, thanks for your reply.

> 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. smile
>>
>>> 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,

As far as I can see, that function calls the ShellExecute() API function
(provided by "shell32.dll").

> I think it got
> rid of an annoying dos window briefly appearing when using system().

Yes, I think on Windows, ShellExecute() is a good alternative to
system(). Thanks for the hint.

> AFAIK, system_exec() always waits for the command to complete before
> returning the exit code from the program.

Now, after having read the replies to my post, I think anything else
wouldn't make much sense.

Best regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |    |\      _,,,---,,_
 \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
  X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
 / \  and unneeded MIME     |  '---''(_/--'  `-'\_)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu