GNU bug report logs - #24232
ls --color cannot be interrupted by a signal

Previous Next

Package: coreutils;

Reported by: Kamil Dudka <kdudka <at> redhat.com>

Date: Mon, 15 Aug 2016 13:56:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Kamil Dudka <kdudka <at> redhat.com>
Subject: bug#24232: closed (Re: bug#24232: [PATCH] ls: postpone
 installation of signal handlers)
Date: Tue, 06 Sep 2016 16:00:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#24232: ls --color cannot be interrupted by a signal

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 24232 <at> debbugs.gnu.org.

-- 
24232: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24232
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Kamil Dudka <kdudka <at> redhat.com>
Cc: 24232-done <at> debbugs.gnu.org
Subject: Re: bug#24232: [PATCH] ls: postpone installation of signal handlers
Date: Tue, 6 Sep 2016 16:59:08 +0100
On 06/09/16 16:38, Kamil Dudka wrote:
> ... until they are actually needed.  That is right before the first
> escape sequence is printed to a terminal.

Cool, that's a good improvement.
Note I moved the NEWS from "bugs" to "improvements".
Also I tweaked a long line to avoid `make syntax-check` failure.

Will push later.

thanks!
Pádraig


[Message part 3 (message/rfc822, inline)]
From: Kamil Dudka <kdudka <at> redhat.com>
To: bug-coreutils <at> gnu.org
Subject: ls --color cannot be interrupted by a signal
Date: Mon, 15 Aug 2016 15:55:04 +0200
If 'ls --color' outputs to a terminal and a syscall blocks (e.g. while reading 
a directory from unresponsive network file system), it cannot be interrupted 
by a signal.

This seems to be caused by the code of ls, which sets the SA_RESTART flag on 
terminating signals.  A possible solution would be to reset the flag prior to 
calling certain blocking syscalls and process the signals synchronously in an 
EINTR loop.

Alternatively, we can document this behavior as intended (or broken by design) 
and suggest users to disable color output or redirect the output off terminal 
to work around the issue.

Any other idea how to solve it?

Originally reported at: https://bugzilla.redhat.com/1365933

Kamil



This bug report was last modified 8 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.