Doc needs help
Please note that the CreateProcess() API does not imply the Windows command interpreter (cmd.exe and therefore commands that are built in the command interpreter can only be activated using the command interpreter.
Should be "does not involve the Windows command interpreter cmd.exe
"
See also
Wikipedia: child process
See also
- CreateProcess is a macro. It selects between calling between CreateProcessA and CreateProcessW, which take strings in Windows-1251 or UCS-2 (maybe?), respectively.
Note
You may want to use process_create/3 because:
The command is passed as a string to the Bourne shell and is thus subject to the vagaries of the interpreter breaking it apart into command + args etc, i.e. the programmer has to perform quoting and escaping prior to invoking, an error-prone undertaking.
Compare with
Perl's system
:
https://perldoc.perl.org/functions/system.html#exec-LIST
Java's Runtime.exec()
:
https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/lang/Runtime.html
Package "by_unix"
There is package "by_unix" ("an elegance layer to calling unix commands") to call unix commands more directly (I haven't tried it but it looks very promising)
See also
- shell/0 - Execute interactive shell, from library(shell)
- shell/1 - SWI Prolog's way of "shelling"
- shell/2 - SWI Prolog's way of "shelling" (this page)
- system∕1 - YAP's way of "shelling" from
library(yap)
, calls shell/1 - system∕0 - SICStus' way of "shelling"
library(system)
, calls shell/0 - system∕1 - SICStus' way of "shelling"
library(system)
, calls shell/1 - system∕2 - SICStus' way of "shelling" from
library(system)
, calls shell/2 - process_create/3