shell-command(2)
[Home]
[Commands]
[Variables]
[Macro-Dev]
[Glossary]
NAME
SYNOPSIS
DESCRIPTION
shell-command performs an operating system call with the given string as its argument. The command only fails if the shell-command call returns -1. The
$result(5) variable is set the return value and can be used to test the result.
The argument n can be used to change the default behavior of the shell-command, n is a bit based flag where:-
0x01
When set shell-command waits for the command to complete, this is the default behavior. When not set the command is launched and forgotten about, the value returned in
$result(5) will not reflect the exit code of the executed process itself.
0x04
Disable the use of the command-line processor to launch the program (win32 versions only). By default the "command" is launched by executing the command:
%COMSPEC% /c command
Where %COMSPEC% is typically command.com. If this bit is set, the "command" is launched directly.
0x08
Detach the launched process from MicroEmacs (win32 versions only). By default the command is launched as a child process of MicroEmacs with a new console. With this bit set the process is completely detached from MicroEmacs instead.
0x10
Disable the command name mangling (win32 versions only). By default any '/' characters found in the command name (the first argument only) are converted to '\' characters to make it Windows compliant.
0x20
Displays the new process window (win32 versions only), by default the window is hidden.
0x100
When set the command-line to be run is the first line of buffer string, this feature can be used to overcome the default 1024 character command-line limit. When a multiple-line command-line is required, a negative argument can be given to
insert-string(2).
0x200
No wait option, when set the the command is run without waiting for any completion status. This allows processes to be run and then forgotten about e.g. a Word processor, Adobe Acrobat reader etc.
SEE ALSO
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12