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

interrupting a process spawned by nushell closes the pane #615

Closed
midnightexigent opened this issue Jul 10, 2021 · 3 comments · Fixed by #648
Closed

interrupting a process spawned by nushell closes the pane #615

midnightexigent opened this issue Jul 10, 2021 · 3 comments · Fixed by #648
Labels
compatibility Issues with VT/terminal compatibility suspected bug

Comments

@midnightexigent
Copy link

midnightexigent commented Jul 10, 2021

Basic information

zellij --version: zellij 0.14.0
tput lines: 47
tput cols: 170
uname -av: Linux desktop-776A 5.12.14-artix1-1 SMP PREEMPT Thu, 01 Jul 2021 20:51:04 +0000 x86_64 GNU/Linux

Programs to interact with

nu --version: 0.34.0 (with default features)

Steps to reproduce

  • from any tty run, env SHELL=nu zellij setup --clean
  • in the shell, run any interruptible command (example: sleep 10sec)
  • ctrl-c to interrupt the process
  • the pane will be closed
@a-kenji
Copy link
Contributor

a-kenji commented Jul 20, 2021

Hello @midnightexigent thank you for taking the time
filing this report!

I can reproduce the problem.

@midnightexigent
Copy link
Author

Hello, thanks for looking into this !

So this is an actual bug, right ?

@a-kenji
Copy link
Contributor

a-kenji commented Jul 20, 2021

Yes, this is definitely an actual bug.
I just wanted to underline that it can be reproduced, so it
is likely not happening solely on your end.

@a-kenji a-kenji added the compatibility Issues with VT/terminal compatibility label Aug 1, 2021
tw4452852 added a commit to tw4452852/zellij that referenced this issue Aug 15, 2021
nushell doesn't create a new process group when spawnning a process,
so all processes including the ones spwanned by us are in the same
foreground group. So if kernel will send signal to every member of this
group.

This patch fixes this issue by creating a new foreground process group
when spawnning a new terminal pane.

Fix zellij-org#615

Signed-off-by: Tw <tw19881113@gmail.com>
imsnif added a commit that referenced this issue Aug 16, 2021
* fix unexpected pane closing issue with nushell

nushell doesn't create a new process group when spawnning a process,
so all processes including the ones spwanned by us are in the same
foreground group. So if kernel will send signal to every member of this
group.

This patch fixes this issue by creating a new foreground process group
when spawnning a new terminal pane.

Fix #615

Signed-off-by: Tw <tw19881113@gmail.com>

* add comment about unsafe

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues with VT/terminal compatibility suspected bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants