Re: xditview '.' hangs: Errata to my previous mail :(

2010-12-07 Thread Krzysztof Żelechowski
Dnia poniedziałek, 6 grudnia 2010 o 21:30:23 Philipp Hagemeister napisał(a): Sorry for the mixup, corrected: You've just introduced a race condition: What if I delete the file just after you called *stat* and create a *directory* in its place? Use fstat instead of stat. Examine the value

Re: xditview '.' hangs

2010-12-06 Thread Pat Kane
Strace shows that xditview . does: open(., O_RDONLY) = 4 followed by an infinite number of: read(4, 0xb7576000, 4096) = -1 EISDIR (Is a directory) Looks broken. Pat --- 2010/12/5 Krzysztof Żelechowski giecr...@stegny.2a.pl: To reproduce: say { xditview '.';

Re: xditview '.' hangs

2010-12-06 Thread Krzysztof Żelechowski
Dnia poniedziałek, 6 grudnia 2010 o 14:47:02 Pat Kane napisał(a): Strace shows that xditview . does: open(., O_RDONLY) = 4 followed by an infinite number of: read(4, 0xb7576000, 4096) = -1 EISDIR (Is a directory) Looks broken. Looks like the programmer

Re: xditview '.' hangs

2010-12-06 Thread Pat Kane
Attached is a patch to try. Pat --- [PATCH xditview] Make sure filename is a regular file. If filename is not '-' or '|' make sure it is a regular file. Signed-off-by: Patrick E. Kane pekan...@gmail.com --- xditview.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-)

Re: xditview '.' hangs

2010-12-06 Thread Philipp Hagemeister
You've just introduced a race condition: What if I delete the file just after you called fstat and create a regular file in its place? Use fstat instead of stat. Regards, Philipp Pat Kane wrote: Attached is a patch to try. Pat --- [PATCH xditview] Make sure filename is a regular file.

Re: xditview '.' hangs: Errata to my previous mail :(

2010-12-06 Thread Philipp Hagemeister
Sorry for the mixup, corrected: You've just introduced a race condition: What if I delete the file just after you called *stat* and create a *directory* in its place? Use fstat instead of stat. Regards, Philipp Pat Kane wrote: Attached is a patch to try. Pat --- [PATCH xditview] Make