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

ctrl+c not working on root's BASH shell #1156

Closed
seffparker opened this issue Jun 6, 2019 · 8 comments
Closed

ctrl+c not working on root's BASH shell #1156

seffparker opened this issue Jun 6, 2019 · 8 comments

Comments

@seffparker
Copy link

seffparker commented Jun 6, 2019

Problem description
Screenshot_2019-06-06-09-38-52-718_com termux
As the title states, the ctrl+c interrupt doing nothing in BASH shells running as root user.

Tried all three methods, volkey+c, termux alt keyboard, hackers keyboard. None works in root's bash. There were no issues later, this only started recently.
All methods works in root's sh shell, and non-root's bash shell.

Tried termux builtin BASH (v5) and a third-party bash (v4). Same issue on both.

Trid toggling SeLinux, no luck.

Steps to reproduce
su as root user to a BASH (not sh) shell and run any command that require an interrupt or just type a command name without pressing ENTER key, and then hit ctrl+c

Expected behavior
ctrl+c send interrupt and leaves the process.

Additional information
$ termux-info
Updatable packages:
All packages up to date
Subscribed repositories:
https://dl.bintray.com/grimler/termux-root-packages-21 root/stable
https://termux.net stable/main
https://termux.net stable/main
System information:
Linux batmobile 4.9.112-perf-gf165f5d #1 SMP PREEMPT Wed Apr 3 16:46:50 WIB 2019 aarch64 Android
Termux-packages arch:
aarch64
Android version:
9
Device manufacturer:
Xiaomi
Device model:
POCO F1

@ghost
Copy link

ghost commented Jun 6, 2019

What is output of stty -a command running as root ?

@ghost
Copy link

ghost commented Jun 6, 2019

There were no issues later, this only started recently.
and a third-party bash (v4). Same issue on both.

This points that issue is not Termux-specific. Especially when you use old third-party bash version and it affected by same issue.

No changes were done in bash packages recently (just rebuild). Also, nothing was changed in terminal emulation.

@ghost ghost closed this as completed Jun 6, 2019
@seffparker
Copy link
Author

Why its closed? The issue started without modifying anything on the third-party bash, and affect both bash version including the lastest one comes with termux-app.

So, its not bash's version specific. Its bash as root user.

@seffparker
Copy link
Author

What is output of stty -a command running as root ?

speed 38400 baud; rows 77; columns 106; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel
-iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc```

@seffparker
Copy link
Author

Forgot add. I use both versions of bash binaries within the termux itself via su -s /path/to/shell method

@Grimler91
Copy link
Member

@seffparker try re-rooting/updating su. The problem probably lies in your su variant.

Does ctrl + c work from a su bash shell in other terminal apps?

@ghost
Copy link

ghost commented Jun 6, 2019

intr = ^C;

Your stty output is correct so possible problems only:

  • With su binary.

  • With environment variables.

I suggest you to try command tsu instead of su -s /path/to/shell. Regular su binary resets environment variables by default which may cause issues.

@seffparker
Copy link
Author

You guys are correct. I have exact issue on terminal elmulator too.

So, it must be with su as you stated. btw, I use latest Magisk 19.3

@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants