Yes, it is usable on Windows, Linux, and others
For this simple example (quickly written), what about this one, which
launch a process hidden, and get the output
(Don't forget to enable multi threaded option.)
last_error: INTEGER
output_of_command (a_cmd, a_dir: STRING): STRING is
-- Output of command `a_cmd' launched in directory `a_dir'.
require
cmd_attached: a_cmd /= Void
dir_attached: a_dir /= Void
local
pf: PROCESS_FACTORY
p: PROCESS
retried: BOOLEAN
do
if not retried then
last_error := 0
create Result.make (10)
create pf
p := pf.process_launcher_with_command_line (a_cmd, a_dir)
p.set_hidden (True)
p.set_separate_console (False)
p.redirect_output_to_agent (agent (res: STRING; s: STRING)
do
res.append_string (s)
end (Result, ?)
)
p.launch
p.wait_for_exit
else
last_error := 1
end
rescue
retried := True
retry
end
Hope this helps,
Jocelyn
On 9/10/2008 13:51, Daniel Tuser wrote:
> I would like to use EiffelProcess. Could someone tell me if it is usable
> with Windows and Linux? And are there simple examples?
>
> Regards,
> Daniel
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>
>