Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login shell doesn't send SIGHUP to background jobs when it receives a SIGHUP #1377

Open
krader1961 opened this issue Aug 12, 2019 · 0 comments
Labels

Comments

@krader1961
Copy link
Contributor

I took some time to write tests to resolve #1359 and was surprised that one of them fails on every platform. After some debugging it occurred to me to verify whether ksh actually behaves as documented. The answer is, it doesn't. This is from ksh93u+ but the current version behaves the same:

20:45 macpro ~/p/3/a/build (disown-tests)> /bin/ksh -l
KSH PROMPT:1: echo $$
64845
KSH PROMPT:2: /bin/sleep 33 &
[1]     64852
KSH PROMPT:3:
fish: '/bin/ksh -l' terminated by signal SIGHUP (Terminal hung up)
20:45 macpro ~/p/3/a/build (disown-tests)> ps -fp 64852
  UID   PID  PPID   C STIME   TTY           TIME CMD
  501 64852     1   0  8:45PM ttys011    0:00.00 /bin/sleep 33

Bash behaves as expected:

20:46 macpro ~/p/3/a/build (disown-tests)> bash -l
macpro:build krader$ echo $$
64883
macpro:build krader$ /bin/sleep 33 &
[1] 64895
macpro:build krader$ fish: 'bash -l' terminated by signal SIGHUP (Terminal hung up)
20:47 macpro ~/p/3/a/build (disown-tests)> ps -fp 64895
  UID   PID  PPID   C STIME   TTY           TIME CMD

The current ksh behavior means that disown isn't needed.

@krader1961 krader1961 added the bug label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant