Class Process.Process
- Description
Slightly polished version of create_process.
In addition to the features supported by create_process, it also supports:
Callbacks on timeout and process termination.
Using Tools.Standalone.forkd via RPC to spawn the new process.
- See also
- Inherit
create_process
inherit create_process : create_process
- Description
Based on create_process.
- Method
create
Process.Process Process.Process(
string
|array
(string
)command_args
,mapping
(string
:mixed
)|void
modifiers
)- Parameter
command_args
Either a command line array, as the command_args argument to create_process(), or a string that will be splitted into a command line array by calling split_quoted_string() in an operating system dependant mode.
- Parameter
modifiers
In addition to the modifiers that create_process accepts, this object also accepts
"read_callback"
:function
(Process
:void
)This callback is called when there is data to be read from the process.
"timeout_callback"
:function
(Process
:void
)This callback is called if the process times out.
"timeout"
:int
The time it takes for the process to time out. Default is 15 seconds.
"forkd"
:bool
Use Tools.Standalone.forkd to actually spawn the process.
- Note
The default value for the
"forkd"
modifier may be set via set_forkd_default().- See also
create_process, create_process()->create(), split_quoted_string(), Tools.Standalone.forkd, set_forkd_default(), get_forkd_default()