new Process()
A process managed by the shell.
- Source:
Methods
-
exitCode() → {number}
-
- Source:
Returns:
-
the process exit code when the status is otherwise
null
-
- Type
- number
-
getSession() → {Session}
-
- Source:
Returns:
-
the process session
-
- Type
- Session
-
getTty() → {Tty}
-
- Source:
Returns:
-
the process tty
-
- Type
- Tty
-
interrupt(completionHandler) → {boolean}
-
Attempt to interrupt the process.
Parameters:
Name Type Description completionHandler
function handler called after interrupt callback - Source:
Returns:
true if the process caught the signal- Type
- boolean
-
resume(foreground, completionHandler)
-
Suspend the process.
Parameters:
Name Type Description foreground
boolean completionHandler
function handler called after resume callback - Source:
-
run(foregraound, completionHandler)
-
Run the process.
Parameters:
Name Type Description foregraound
boolean completionHandler
function handler called after process callback - Source:
-
setSession(session) → {Process}
-
Set the process session
Parameters:
Name Type Description session
Session the process session - Source:
Returns:
this object- Type
- Process
-
setTty(tty) → {Process}
-
Set the process tty.
Parameters:
Name Type Description tty
Tty the process tty - Source:
Returns:
this object- Type
- Process
-
status() → {Object}
-
- Source:
Returns:
-
the current process status
-
- Type
- Object
-
suspend(completionHandler)
-
Resume the process.
Parameters:
Name Type Description completionHandler
function handler called after suspend callback - Source:
-
terminate(completionHandler)
-
Terminate the process.
Parameters:
Name Type Description completionHandler
function handler called after end callback - Source:
-
terminatedHandler(handler) → {Process}
-
Set an handler for being notified when the process terminates.
Parameters:
Name Type Description handler
function the handler called when the process terminates. - Source:
Returns:
this object- Type
- Process
-
toBackground(completionHandler)
-
Set the process in background.
Parameters:
Name Type Description completionHandler
function handler called after background callback - Source:
-
toForeground(completionHandler)
-
Set the process in foreground.
Parameters:
Name Type Description completionHandler
function handler called after foreground callback - Source: