Jim Meyering wrote:

In that case, I think we're just lucky that those malloc calls
seem to work. We'll need a more robust solution.


Right, I managed to hang dd with the following modifications:
- anticipatory gettext initialization (my patch)
- no gettext
- no fprintf (not even evaluating its arguments)

Of course, with each steps it takes an order of magnitude longer for the script
to trigger the problem.


It seems to me the only solution is the usual Unix way : set a flag in the sighandler,
and check it after the system calls or others possibly long operations.
I think it's what Paul have in mind, but it does not need the errno==EINTR behaviour,
it can check the flag unconditionally.


Something I'd like to know is what exactly is happening, dd seems to deadlock on a futex
but I can't find out in glibc where this lock is taken.


Regards.

--
Guillaume



_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to