The environment variables for the task
ReadonlyisCheck if the task is currently running
ReadonlypidThe process ID of the running task
ReadonlyterminationThe termination reason
ReadonlyterminationThe termination status of the task
The working directory for the task
Wait for the task to exit, blocking Hammerspoon until it does
Optionaltimeout: number
The most time to wait, in seconds. Leave it out (or pass null or Infinity) to wait for as long as the task runs. 0 or a negative number doesn't wait.
true if the task isn't running, false if it was still running when the time ran out
Nothing else in your configuration runs while this waits: timers, hotkeys and other callbacks are delayed until it returns. Use waitUntilExit() to wait without blocking. A task that never finishes blocks Hammerspoon forever unless you give a timeout, so always give one where that would be a problem, e.g. in hs.onShutdown.
Interrupt the task (send SIGINT)
Terminate the task with extreme prejudice (send SIGKILL)
Pause the task (send SIGSTOP)
Resume the task (send SIGCONT)
Write data to the task's stdin
The string data to write
Terminate the task (send SIGTERM)
Wait for the task to exit, without blocking Hammerspoon
Optionaltimeout: number
The most time to wait, in seconds. Leave it out (or pass null or Infinity) to wait for as long as the task runs. 0 or a negative number doesn't wait.
A Promise that resolves to true once the task isn't running (after its termination callback has been called, so all its output has been delivered), or to false if it was still running when the time ran out
Object representing an external process task