这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ewt45
Copy link
Contributor

@ewt45 ewt45 commented Feb 20, 2025

using app_process option --nice-name=termux-x11 to set its process name to termux-x11
so that users can understand the process better and easier to kill the process manually

but this will break the current pattern where users kill process using pkill -f com.termux.x11

before

~ $ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
u0_a287   3584  2.5  2.5 8907428 182396 ?      S<l   1970   0:26 com.termux
u0_a287   3673  0.0  0.0 2219460 3732 pts/0    S<s   1970   0:00 /data/data/com.termux/files/usr/bin/bash -l
u0_a287   8889  0.0  0.0 2190788 4440 pts/1    S<s   1970   0:00 /data/data/com.termux/files/usr/bin/bash -l
u0_a287  12646  9.4  2.1 7892644 154636 pts/0  S<l+  1970   0:01 /system/bin/app_process -Xnoimage-dex2oat / com.termu
u0_a287  12771  1.0  0.0 2176452 3052 pts/1    R<+   1970   0:00 ps aux

after

~ $ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
u0_a287   3584  2.8  2.3 8924684 171152 ?      S<l   1970   0:31 com.termux
u0_a287   3673  0.0  0.0 2219460 3732 pts/0    S<s   1970   0:00 /data/data/com.termux/files/usr/bin/bash -l
u0_a287   8889  0.0  0.0 2190788 4440 pts/1    S<s   1970   0:00 /data/data/com.termux/files/usr/bin/bash -l
u0_a287  13124 11.5  2.1 7599780 154116 pts/0  S<l+  1970   0:00 termux-x11
u0_a287  13167  1.0  0.0 2170308 3128 pts/1    R<+   1970   0:00 ps aux

@twaik
Copy link
Member

twaik commented Feb 21, 2025

Seems like instead of --nice-name=termux-x11 I can do --nice-name="termux-x11 com.termux.x11 $*" which will let people use pkill termux-x11, save compatibility with pkill -f com.termux.x11 and also will show commandline arguments in ps.

using app_process option --nice-name to set its process name
@twaik twaik merged commit d34471c into termux:master Feb 21, 2025
@twaik
Copy link
Member

twaik commented Feb 21, 2025

Thanks!

@ewt45 ewt45 deleted the app_process_name branch March 5, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants