top | item 39652922

(no title)

colinng | 2 years ago

Gosh I am not a fan of long articles that read like a mystery novel.

discuss

order

_nalply|2 years ago

I am not sure whether I understood it at all but it seems that zsh has a quirk. Interactive shells become the process group leader because they need to manage signals. If you hit Ctrl-C then as a process group leader the signal is forwarded to child processes. And zsh has the quirk that if the last command is not a built-in, zsh calls execve such that zsh becomes the last command. But then the last command is the process group leader and when it exits, no process is the process group leader anymore and Ctrl-C gets lost. Weird.

I am not sure whether this quirk is specific to zsh, but the article mentions zsh, so your mileage might vary.