[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dd hangs with SIGINT
From: |
Guillaume Chazarain |
Subject: |
Re: dd hangs with SIGINT |
Date: |
Fri, 08 Apr 2005 10:46:49 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) |
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