service: Service a query from a background job

Package: language

Usage

service [job]

Parameters

job
A background job number (defaults to 1).

Description

When a background job requires input from the terminal (e.g. if it queries for a parameter), the job enters a stopped state, and a message is displayed on the terminal. At the user's convenience, he should respond with a service command specifying the appropriate job number. The jobs command can also be used to see what jobs require attention.

After entering the service command, any prompt sent by the background job is displayed, and the user may return a single line of input to the background task. Should more lines be needed several service calls may be necessary. The user may service jobs in any order, regardless of how the requests from the background jobs were received.

Example

1. Respond to a parameter request from job 3.

cl> service 3

Bugs

If one never responds to a request for service from a background job, the job will eventually time out and abort. In principle it is possible to service queued background jobs as well as interactive (subprocess) background jobs, but in practice the request for service never reaches the terminal (and thus the user), hence all parameters should be specified before submitting a job to execute in a queue.

See also

jobs, kill