IF Computer > MINERVA > Example Programs > MINERVA Features > ExecProcess_2

ExecProcess_2

MINERVA
ifcomputer logo
f
Expert Services on the Web

Executing an synchronous process using the operating system. The example exec.min is easy to use and integrate.

It also shows how to work with the input, output, error streams in either file or prolog list form, whichever is more convenient for the application.

The example is configured as standalone, but can also be used as servlet.

% exec(+Commandline) :-
% exec(+Commandline,-ExitCode) :-
% exec(+Commandline,-ExitCode,InputLines) :-
% exec(+Commandline,-ExitCode,InputLines,OutputLines) :-
% exec(+Commandline,-ExitCode,+InputLines,-OutputLines,-ErrorLines) :-
% exec_files(+Commandline,-ExitCode,+InputFile,+OutputFile,+ErrorFile) :-

Examples:

minerva -l exec

?- exec(ls) ?- exec('ls -l',ExitCode,[],OutputLines). ?- exec('Mail -s test me@work',E,[hello,you],Out,Err). ?- exec_files('Mail -s test me@work',E,'exec.min','out.log','err.log').

document: http://www.ifcomputer.co.jp/MINERVA/ExamplePrograms/MinervaFeatures/ExecProcess_2/print_de.html
published 2008/11/17 update 2002/3/20 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS