Skip to content

Is --on-process-exit called if the pid has already exited? #7207

@mattgreen

Description

@mattgreen

Hi,
Been switching to fish recently and loving it. Thanks for all your hard work!

I’m building an async git prompt. I create a background job to check the dirty status of the repo, grab the PID with jobs --last --pid, and register a function to run when the job finishes using --on-process-exit $pid. If the OS scheduler interrupts execution before I register my handler in the parent process, and the job runs to completion, will my --on-process-exit callback still occur?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions