1

I used the following command from this question to test out using socat to build a terminal with rich signals:

socat file:'/dev/tty',raw,echo=0 exec:'bash -li',pty,stderr,setsid,sigint,sane

On Linux, it worked fine and everything was as expected.

On OSX, I get the following output:

2023/03/24 22:15:52 socat[35049] E waitpid(): child 35050 exited on signal 9

What causes OSX to kill the child here? Is it possible to stop this from happening?

Out of curiosity, I tried with sudo and got the same result so I can confirm it has anything to do with user permissions.

merlin2011
  • 2,117

1 Answers1

0

I played around with options and found that if -i is not passed, then the process does not get killed.

socat file:'/dev/tty',raw,echo=0 exec:'bash -l',pty,stderr,setsid,sigint,sane

What is curious is that it looks like bash is started as an interactive shell anyways, as we would expect because no commands are passed.

echo $-
himBH

Somehow, passing the -i option causes OSX to be angry even though it should have no effect.

merlin2011
  • 2,117