Skip to content

Job-control shell should suspend itself when it is started as a background job #135

Closed
@magicant

Description

@magicant

POSIX requires that the job-control shell suspend itself if invoked in the background:

If its process group is not the foreground process group associated with the terminal (which would result from it being started by a job-control shell as a background job), the shell shall either stop itself by sending itself a SIGTTIN signal or, if interactive, attempt to read from standard input (which generates a SIGTTIN signal if standard input is the controlling terminal). If it is stopped, then when it continues execution (after receiving a SIGCONT signal) it shall repeat these steps.

Yash suspends itself by calling tcsetpgrp instead of raising SIGTTIN, and we're not going to change the behavior (see magicant/yash-rs#421 (comment)). We should document the intentional deviation from the standard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions