Skip to content

Simplify by killing the child process on HUP? #1

@adamwight

Description

@adamwight

The fd>2 is a neat idea, but what if this tool listened for SIGHUP to detect the intention to terminate? This is conveniently produced by a closed stdin, so this straightforward commandline would return immediately:

morehup sleep 10 < /dev/null

Just asking because I looked into the topic a bit recently and your utility does seem like a missing standard tool. I found this kind of shim take a few forms in the wild, but they all seem to either wait for end of input, or SIGHUP which are usually equivalent.

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