Skip to content

Saving and restoring the terminal state of a suspended job #136

@magicant

Description

@magicant

POSIX requires that the shell save the terminal settings when a foreground job suspends and restore it when the fg built-in resumes it:

If the shell is interactive, it shall save the terminal settings before changing them to the settings it needs to read further commands

If the fg utility is used from an interactive shell to bring into the foreground a suspended job that was created from a foreground job, before it sends the SIGCONT signal the fg utility shall restore the terminal settings to the ones that the shell saved when the job was suspended.

This is different from when the current implementation saves and restores the settings.

See also magicant/yash-rs#482 and magicant/yash-rs#299.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions