uglydir patch
Pavel Tsekov
ptsekov at gmx.net
Thu Nov 18 10:54:27 UTC 2004
Hello,
On Wed, 17 Nov 2004, Pavel Tsekov wrote:
> This patch is IMO not ready to be checked-in in its current state.
> The main concern is the second hunk - several points:
>
> 1) The return value of read (), which is stored in `rbytes' is not checked
> against -1, a perfectly valid return value.
>
> 2) The second call to read() introduced in this patch could hang since
> the pipe is blocking and the first read () could drain the pipe.
>
> 3) The patch assumes that the first read () will read everything up to
> and including the '\n' in the dir name, but this is not guaranteed.
>
> I think these are important points and need to be addresed or proven
> wrong before this patch is commited. Maybe the original author should
> comment on the issue.
Just for the record - if the subshell is set to tcsh MC hangs on FC3.
9770 pts/0 S+ 0:00 /home/ptsekov/mc-test/usr/bin/mc -U
9773 pts/5 Ts+ 0:00 -csh
[ptsekov at baba-meca abcdef]$ strace -p 9770
Process 9770 attached - interrupt to quit
read(6,
I'm also attaching the output of lsof at the time of the hang.
-------------- next part --------------
mc 9770 ptsekov cwd DIR 3,3 4096 1853198 /home/ptsekov/abc\ndef
mc 9770 ptsekov rtd DIR 3,3 4096 2 /
mc 9770 ptsekov txt REG 3,3 1325655 1853518 /home/ptsekov/mc-test/usr/bin/mc
mc 9770 ptsekov mem REG 3,3 813224 295564 /usr/X11R6/lib/libX11.so.6.2
mc 9770 ptsekov mem REG 3,3 47244 1016923 /lib/libnss_files-2.3.3.so
mc 9770 ptsekov mem REG 3,3 40259184 475279 /usr/lib/locale/locale-archive
mc 9770 ptsekov mem REG 3,3 1509144 1540125 /lib/tls/libc-2.3.3.so
mc 9770 ptsekov mem REG 3,3 94320 1016446 /lib/libnsl-2.3.3.so
mc 9770 ptsekov mem REG 3,3 878185 361313 /usr/lib/libncurses.so.5.4
mc 9770 ptsekov mem REG 3,3 503752 360490 /usr/lib/libglib-2.0.so.0.400.7
mc 9770 ptsekov mem REG 3,3 15208 1016443 /lib/libdl-2.3.3.so
mc 9770 ptsekov mem REG 3,3 9768 360492 /usr/lib/libgmodule-2.0.so.0.400.7
mc 9770 ptsekov mem REG 3,3 107148 1015813 /lib/ld-2.3.3.so
mc 9770 ptsekov 0u CHR 136,0 2 /dev/pts/0
mc 9770 ptsekov 1u CHR 136,0 2 /dev/pts/0
mc 9770 ptsekov 2u CHR 136,0 2 /dev/pts/0
mc 9770 ptsekov 3u unix 0x0d845080 64799 socket
mc 9770 ptsekov 4u CHR 5,2 1047 /dev/ptmx
mc 9770 ptsekov 6u FIFO 3,3 214724 /tmp/mc-ptsekov/mc.pipe.9770
mc 9770 ptsekov 7u FIFO 3,3 214724 /tmp/mc-ptsekov/mc.pipe.9770
More information about the mc-devel
mailing list