Re: system_exec()

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

On Sun, Jul 13, 2003 at 06:07:17PM +0200, Juergen Luethje wrote:
> 
> 
> Hello again Al, you wrote:
> 
> > Juergen Luethje wrote:
> >>
> >>
> >> Hi Jim, you wrote:
> >>
> >>> On Fri, Jul 11, 2003 at 11:49:25PM +0200, Juergen Luethje wrote:
> >>
> >> <big snip>
> >>
> >>>> I'll try to summarize (S: run a child process  sychnronously,
> >>>>                        A: run a child process asychnronously):
> >> Should be "a/synchronously", of course.   -------^^^^^^^^^^^^^^
> >>
> >>>>
> >>>>          |    Euphoria command
> >>>>          |
> >>>>          | system() | system_exec()
> >>>> ---------+----------+--------------
> >>>> DOS      |    S     |      S
> >>>> ---------+----------+--------------
> >>>> Windows  |    A     |      S
> >>>> ---------+----------+--------------
> >>>> Linux    |    S     |      S
> >>>> ---------+----------+--------------
> >>>> FreeBSD  |    S     |      S
> >>>>
> >>>>
> >>>> Is this the bottom line?
> >>>
> >>> I thought that system() under Windows would be 'S' not 'A' ... but
> >>> then again I probably wouldn't know...
> >>
> >> I only can say that under Windows 98, 'A' is correct for system().
> >> I don't think it's likely, that other Windows versions behave different
> >> regarding this point.
> >> Interestingly -- provided this litte table is correct --, the 'A' for
> >> Windows is the exception. The table is almost contrary to what I had
> >> expected. smile
> >>
> >> Anyway, the question of practical importance for me at the moment was
> >> the behaviour of system_exec() under Windows, and that seems pretty
> >> clear now.
> >> Thanks again to all, who helped me.
> >>
> >> Best regards,
> >>    Juergen
> >
> >
> > Hello again,
> >
> > It looks to me that System() is synchronous.  If it werent
> > my EuViewer wouldnt work correctly.
> 
> Hmm... I'd like to have a look at it, but I didn't find anything, when
> I searched for "EuViewer" in the RDS archieve.

> 
> > When i said it only worked with a '2' as second argument,
> > it was actually a much older version of Euphoria.
> > Apparently, either a 0 or a 2 works ok with the viewer (v2.4 tested).
> > This means it's synchronous.  I didnt try '1' because i dont want
> > a beep smile
> 
> OK, then we'll only use 0 or 2 as second parameter for system(). smile

0, 1, and 2 all have the same effect ... they are all synchronous.

> 
> Please try the following code on Windows:
>    system("calc", 2)
>    puts(1, "Hi there.")
>    if getc(0) then end if
> 
> At least on Windows 98, the console window saying "Hi there!" pops up,
> although the calculator is still running.
> That's why I thought, that on Windows system() is asynchronous.

Thats a special property of Windows GUI programs. Not sure why M$
choose to do it like that tho.

Doing system("kcalc &", 2) on a linux/freebsd system via exu would have
system act async as well (since the '&' tells it to run in the background
instead of the foreground).

jbrown

> 
> Best regards,
>    Juergen
> 
> -- 
>  /"\  ASCII ribbon campain  |    |\      _,,,---,,_
>  \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
>   X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
>  / \  and unneeded MIME     |  '---''(_/--'  `-'\_)
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
> 

-- 
 /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
 \ /  campain against           | Linux User:190064
  X   HTML in e-mail and        | Linux Machine:84163
 /*\  news, and unneeded MIME   | http://verify.stanford.edu/evote.html

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

Search



Quick Links

User menu

Not signed in.

Misc Menu