1. Euphoria won't run in background
As far as I can tell, exu will not run in the background, even when a prog
does not use the console. If there is some magic call along the lines of the
free_console() trick to get around this please let me know, otherwise Rob this
is a definite wish.
Daniel
2. Re: Euphoria won't run in background
Daniel Johnson writes:
> As far as I can tell, exu will not run in the background,
> even when a prog does not use the console.
I just ran the following program (junk.exu) in the background
and it worked fine:
atom t
puts(1, "First Line\n")
? rand(1000)
-- delay 30 seconds
t = time()
while time() < t + 30 do
end while
puts(1, "Last Line\n")
The command that I used to run it in the background
was:
exu junk > junk.dat & date
That runs it in the background with standard output
redirected to junk.dat. The date command runs in
the foreground. For 30 seconds if I type: jobs
it tells me that exu junk is "Running". After 30 seconds,
It says exu junk is "Done". The output in junk.dat is correct.
When I try to run a Euphoria program that outputs stuff to
the screen, in the background,
Linux tells me that the program has been suspended
due to terminal output. If I later type: fg
to pull it back into the foreground, the program
resumes and finishes ok.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
3. Re: Euphoria won't run in background
- Posted by Daniel Johnson <dpj22 at CAM.AC.UK>
Feb 20, 2000
-
Last edited Feb 21, 2000
# > As far as I can tell, exu will not run in the background,
# > even when a prog does not use the console.
# I just ran the following program (junk.exu) in the background
# and it worked fine:
OK so at any console input or output it stops ?
My prog now works, but previously it was dirty and did :
system("echo "&useful_information&" > file",2)
with stdin and stdout non-redirected.
Why does this use the console ?
Daniel
--
Daniel Johnson Engineer, smartypants and clown
Jesus College, Cambridge all at a very reasonable price
dpj22 at cam.ac.uk
zeus.jesus.cam.ac.uk/~dpj22 talk dpj22 at jewish.jesus.cam.ac.uk
4. Re: Euphoria won't run in background
- Posted by Robert Craig <rds at ATTCANADA.NET>
Feb 20, 2000
-
Last edited Feb 21, 2000
Daniel Johnson writes:
> My prog now works, but previously it was dirty and did :
> system("echo "&useful_information&" > file",2)
> with stdin and stdout non-redirected.
> Why does this use the console ?
exu initializes curses whenever you call
system(), and curses hasn't been initialized yet.
curses writes some control characters to the screen
when it's initialized.
It should be easy to fix that in the next release.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com