[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why does sh in the build environment ignore SIGINT and SIGQUIT?
From: |
Ryan Prior |
Subject: |
Re: Why does sh in the build environment ignore SIGINT and SIGQUIT? |
Date: |
Sun, 22 May 2022 14:14:51 +0000 |
------- Original Message -------
On Sunday, May 22nd, 2022 at 8:00 AM, Foo Chuan Wei <chuanwei.foo@hotmail.com>
wrote:
> The shell in the environment where packages are built ignores SIGINT and
> SIGQUIT. If I add `(invoke "sh" "-c" "trap")` to a custom build phase
That executes a shell which traps and then immediately exits. By the next step
of the build phase execution it's already gone. The shell isn't ignoring you -
it's not running at all.
> The resulting [smlnj] executable seems to inherit the
> signal dispositions of the shell where the executable is built, with the
> result that CTRL-C is ignored at the sml REPL.
How would it know what some other process would do in response to a signal?
Sounds extremely cursed.