Open whatbh opened 6 months ago
Hi @whatbh.
Ctrl-z for external commands was disabled in https://github.com/leo-arch/clifm/commit/8325919ec88c602e75357dfa20f1ea5f034233c5. Of course this is not a solution, but at least it won't let the shell in an unusable state anymore.
The bug is still present in v. 1.20 on Arch. Hangs whole clifm and no way to get back control of it. Is this gonna be fixed?
Hi @fidodido48. What command are you running exactly? It seems to happen only with specific commands. For example, it does happen with top
, but not with ping
, glxgears
, or htop
.
Hello. Ive tried to suspend rsync for a while.
<0> $ rsync-move 3 6 ~/DLDIR/YTV/SC2/
sending incremental file list
NA.ESL SC2 Masters - B stream: Winter 2023 Regionals Day 6 - Swiss Round 3.mp4
5,97G 100% 8,05MB/s 0:11:47 (xfr#1, to-chk=1/2)
NA.ESL SC2 Masters: Summer 2023 Finals Day 1 - Winners Stage - Stream B.mp4
10,10G 100% 3,14MB/s 0:51:10 (xfr#2, to-chk=0/2)
^Z
And it just hangs like that.
Suspend is disabled because clifm does not do job control. Are you sure it is hanged? Try with Control-C to kill the program and see whether it is responsive or not.
Its not responding - just prints '^C'. Have to kill clifm process from other terminal. This leaves a rsync-zombie process.
Ok. I'll keep investigating this issue. I'm not sure why this happens with some programs and not with others.
This is what we know thus far: Ctrl-z is definitely disabled, but some programs (rsync
, top
) do not like it and do not even allow you to kill the process via a signal (Ctrl-c), while others (ping
, xlgears
, htop
) behave as expected: Ctrl-z is ignored and they just continue running.
I also observed that this depends at some point on the underlying shell. For example, if you run clifm using zsh (CLIFM_SHELL=/bin/zsh clifm
), ping
misbehaves just as top
, while this does not happen if you use bash, dash, or ksh.
If anyone needs it - from other terminal:
pkill -CONT <suspended_process_name>
Worked on ping and top.
I've found out that the issue can be reproduced independently of clifm. For example:
exec sh -cm top
where -m
means: SIGTTIN, SIGTTOU, and SIGTSTP signals shall be ignored
(from the sh
manpage).
Again, since this doesn't happen with htop
, among others, I assume that the issue is related to how the exec'd program behaves when SIGTSTOP (Ctrl-z) is ignored, and not (or at least not directly) to clifm itself.
Describe the bug In a shell, sending the suspend character (
Ctrl+Z
) will suspend the currently running job and return to the shell prompt. Inclifm
, pressingCtrl+Z
will not return toclifm
prompt but put it into an unusable state.To Reproduce Steps to reproduce the behavior:
clifm
, run a program in foreground (top
,ping
,glxgears
,nautilus
, whatever...)Ctrl+Z
(to send suspend character) to suspend it.Expected behavior Suspend the program and return to the
clifm
prompt.Screenshots
Desktop (please complete the following information):