Re: Get the complete output of a program/command

new topic     » goto parent     » topic index » view thread      » older message » newer message
TheDcoder said...

... but I am not sure how I can wait until the process ends... so really my question is "how to wait until a process ends" ...

system_exec() returns an error code - therefore it must wait until the process it calls ends.

And, since the process is finished, you can just dump the output to a file, and use it:

include std/io.e 
include std/console.e 
system_exec("ls -la > lsoutput") 
object results = read_file("lsoutput",TEXT_MODE) 
display(results) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu