From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040627
Description of problem:
If I create a directory with newline (yes, quite unusual) inside,
enter this directory and then start mc, that's the last thing I can
do, it hangs and only kill <mc_pid> helps.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. A=$(echo -ne 'newline\ndir')
2. mkdir "$A"
3. cd "$A"
5. press <TAB>
Actual Results: mc hangs there when you try to change the dir or
switcg the panels.
Expected Results: Such directory should be displayed like in ls ('?'
instead new line or whatever), but not hang mc.
I've tested this with RH9, FC1 (text and graphical console) and
FC2 with UTF-8 and without. Even the Leonard den Ottolander's patched
version (mc-4.6.0-14.10n) nothing changes for me. If I run mc with
ltrace: 'ltrace mc 2> ZZZ' it seems to work (slow, verry slow but
works), but with 'strace mc 2> ZZZ' it hangs again and in the log
there's probably something usefull I did not find. When used without
concurrent shell (mc -u) everything works fine (but the newline
character is simply ignored when showing the path).
I suspect there can be other weird characters that can hang or
even crash mc, but I have not tested this yet.
This is now fixed in rawhide.
Created attachment 106947 [details]
Output of lsof at the time of the hang.
The patch is not good enough. It causes MC to hang when the subshell
is tcsh, as can be seen from this strace:
9770 pts/0 S+ 0:00 /home/ptsekov/mc-test/usr/bin/mc -U
9773 pts/5 Ts+ 0:00 -csh
[ptsekov@baba-meca abcdef]$ strace -p 9770
Process 9770 attached - interrupt to quit
See also the lsof output.
Which patch would this be again?
This is the "uglydir" patch you can see in our src.rpm.