system_callsystem_callSystemCallSystemCallsystem_call (算子)
名称
system_callsystem_callSystemCallSystemCallsystem_call — 执行系统命令。
签名
Herror system_call(const char* Command)
Herror T_system_call(const Htuple Command)
def system_call(command: str) -> None
描述
算子 system_callsystem_callSystemCallSystemCallSystemCallsystem_call executes the system command given in
CommandCommandCommandCommandcommandcommand。
On Windows operating systems, the system command can be prefixed by
'start /b'"start /b""start /b""start /b""start /b""start /b" to avoid waiting for the started application.
On Unix-like operating systems, an interactive shell ('csh -i') will be started,
if CommandCommandCommandCommandcommandcommand contains an empty string.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
CommandCommandCommandCommandcommandcommand (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Command to be called by the system.
默认值:
'ls'
"ls"
"ls"
"ls"
"ls"
"ls"
结果
On Windows operating systems,the operator system_callsystem_callSystemCallSystemCallSystemCallsystem_call will always
return the value 2 (
H_MSG_TRUE)
unless there was a problem creating a new process.
On other operating systems, system_callsystem_callSystemCallSystemCallSystemCallsystem_call will always return
the value 2 ( H_MSG_TRUE )。
可能的前趋
count_secondscount_secondsCountSecondsCountSecondsCountSecondscount_seconds
另见
wait_secondswait_secondsWaitSecondsWaitSecondsWaitSecondswait_seconds,
count_secondscount_secondsCountSecondsCountSecondsCountSecondscount_seconds
模块
基础