Executing an synchronous process using the operating system....
Move to
=> <=
Darueber Spitze
See also
HelloWorld
Use Parameters
Directives
Debugger
Arithmetic
Constraints
File From Server
AppletLoadsFile
GetURL
Client-Server with Sockets
Date
ExecProcess
ExecProcess_2
GUI
GuiEvents
Gui Image
Interactive
JavaToMinerva_1
JavaToMinerva_2
JavaToMinerva_3
JavaToMinerva_4
JavaToMinerva_5
JavaToMinerva_6
Java Applet Uses Minerva
JavaArrays
MinervaToJava
MinervaToJavaScript
MinervaToJava_1
MinervaToJava_2
MinervaToJava_3
MinervaToJava_4
Reflection
Servlet
JDBC
Internationalization
StartupArchive
IF Computer > MINERVA > Example Programs > MINERVA Features > ExecProcess_2

ExecProcess_2

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').

read on...
MINERVA
ifcomputer logo
f
Expert Services on the Web
Sprache
English
Japanese
Server
USA
Japan
Site Access
Local Index
Local Contents
Site Contents
Site Index
Printer Friendly
For imode
For PDA
Search
document: http://www.ifcomputer.co.jp/MINERVA/ExamplePrograms/MinervaFeatures/ExecProcess_2/home_de.html
published 2008/9/1 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
scroll to top managed with ubiCMS