HSTask
Type
Object representing an external process task
Properties
isRunning
boolean
Check if the task is currently running
environment
{[key: string]: string}
The environment variables for the task
workingDirectory
string
The working directory for the task
terminationStatus
NSNumber
The termination status of the task
Methods
start()
Start the task
Hammerspoon 2/Modules/hs.task/HSTask.swift:16
Parameters
None
Returns
HSTask - The task object for chaining
terminate()
Terminate the task (send SIGTERM)
Hammerspoon 2/Modules/hs.task/HSTask.swift:19
Parameters
None
Returns
Nothing
kill9()
Terminate the task with extreme prejudice (send SIGKILL)
Hammerspoon 2/Modules/hs.task/HSTask.swift:22
Parameters
None
Returns
Nothing
interrupt()
Interrupt the task (send SIGINT)
Hammerspoon 2/Modules/hs.task/HSTask.swift:25
Parameters
None
Returns
Nothing
pause()
Pause the task (send SIGSTOP)
Hammerspoon 2/Modules/hs.task/HSTask.swift:28
Parameters
None
Returns
Nothing
resume()
Resume the task (send SIGCONT)
Hammerspoon 2/Modules/hs.task/HSTask.swift:31
Parameters
None
Returns
Nothing
waitUntilExit()
Wait for the task to complete (blocking)
Hammerspoon 2/Modules/hs.task/HSTask.swift:34
Parameters
None
Returns
Nothing
sendInput(data)
Write data to the task's stdin
Hammerspoon 2/Modules/hs.task/HSTask.swift:38
Parameters
-
datastringThe string data to write
Returns
Nothing
closeInput()
Close the task's stdin
Hammerspoon 2/Modules/hs.task/HSTask.swift:41
Parameters
None
Returns
Nothing