mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-06 02:01:30 +08:00

It is possible to run a function when a process exits via `function --on-process-exit`, or when a job exits via `function --on-job-exits`. Internally these were distinguished by the pid in the event: if it was positive, then it was a process exit. If negative, it represents a pgid and is a job exit. If zero, it fires for both jobs and processes, which is pretty weird. Switch to tracking these explicitly. Separate out the --on-process-exit and --on-job-exit event types into separate types. Stop negating pgids as well.