new Job()
- Source:
Methods
id() → {number}
- Source:
Returns:
-
the job id
-
- Type
- number
interrupt() → {boolean}
Attempt to interrupt the job.
- Source:
Returns:
true if the job is actually interrupted
- Type
- boolean
lastStopped() → {number}
- Source:
Returns:
-
when the job was last stopped
-
- Type
- number
line() → {string}
- Source:
Returns:
-
the execution line of the job, i.e the shell command line that launched this job
-
- Type
- string
process() → {Process}
- Source:
Returns:
-
the first process in the job
-
- Type
- Process
resume(foreground) → {Job}
Resume the job.
Parameters:
Name | Type | Description |
---|---|---|
foreground |
boolean | true when the job is resumed in foreground |
- Source:
Returns:
- Type
- Job
run() → {Job}
Run the job, before running the job a must be set.
- Source:
Returns:
this object
- Type
- Job
setSession(session) → {Job}
Set a session on the job.
Parameters:
Name | Type | Description |
---|---|---|
session |
Session | the session to use |
- Source:
Returns:
this object
- Type
- Job
setTty(tty) → {Job}
Set a tty on the job.
Parameters:
Name | Type | Description |
---|---|---|
tty |
Tty | the tty to use |
- Source:
Returns:
this object
- Type
- Job
status() → {Object}
- Source:
Returns:
-
the job exec status
-
- Type
- Object
statusUpdateHandler(handler) → {Job}
Set an handler called when the job terminates.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the terminate handler |
- Source:
Returns:
this object
- Type
- Job
suspend() → {Job}
Resume the job.
- Source:
Returns:
this object
- Type
- Job
terminate()
Terminate the job.
- Source:
toBackground() → {Job}
Send the job to background.
- Source:
Returns:
this object
- Type
- Job
toForeground() → {Job}
Send the job to foreground.
- Source:
Returns:
this object
- Type
- Job