1 Suppose that, using bash,
2 I launch a minish script, press Ctrl+Z, and run “fg”.
3 I would expect the script to resume executing.
5 minish and its command must be in the same process group,
9 each command is executed in the same process group as the shell;
11 each command is executed in its own process group.
12 This has been standard practice for a long time,
13 and I think it is very sensible.
15 signal name keys to press default action
16 -----------------------------------------------------------------
17 SIGINT CTRL+C terminate
18 SIGQUIT CTRL+\ terminate and produce a core dump
19 SIGTSTP CTRL+Z suspend
21 SIGINT, SIGQUIT, and SIGTSTP can be produced interactively
22 and are sent to the foreground process group.
24 if a command is executing, it receives signals,
25 but minish does not, because they are in different process groups;
26 if no commands are executing, minish reacts to signals normally.
28 both minish and the command it is executing are sent signals,
29 but minish ignores them;
30 if the command stops executing because of SIGINT or SIGTSTP,
31 minish does, too, by raising the same signal without ignoring it;
32 if the command stops executing becouse of SIGQUIT,
33 minish terminates by returning EXIT_FAILURE,
34 because the user probably did not want its core to be dumped.
39 https://wiki.archlinux.org/index.php/Core_dump/
40 https://gnu.org/software/libc/manual/html_node/Termination-Signals.html