イフコンピュータ > MINERVA > 例題プログラム > MINERVAの特徴 > ExecProcess_2

ExecProcess_2

MINERVA
ifcomputer logo
f
Expert Services on the Web

オペレーティングシステムを使って同時プロセスを実行させます。 exec.minの例は、使いやすく、統合しやすい プログラムです。

また、この例から ファイルあるいはリストの形式のいずれか、つまりアプリケーションにとってより 都合の良い方法で、入出力やエラーストリームを処理する 方法がわかります。

この例はスタンドアローンとして構成されていますので、サーブレット として使用することもできます。

% 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) :-

例:

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_jp.html
published 2008/10/6 update 2002/3/20 (c) 1996-2006 IF Computer Japan
IF Computer 〒113-0022 Tel 03-5814-3352 start (AT) ifcomputer.com
Customer Support 東京都文京区千駄木5-28-2   http://www.ifcomputer.co.jp
戻る> managed with ubiCMS