GNU bug report logs - #33965
handling of closed file descriptors

Previous Next

Package: diffutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Thu, 3 Jan 2019 19:43:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Meyering <jim <at> meyering.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#33965: closed (handling of closed file descriptors)
Date: Fri, 04 Jan 2019 06:16:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 3 Jan 2019 22:15:19 -0800
with message-id <CA+8g5KEe5CDHBKFqUgEUTV6saK2XDSn2_SVPQp_U53SRMABDWA <at> mail.gmail.com>
and subject line Re: [bug-diffutils] bug#33965: handling of closed file descriptors
has caused the debbugs.gnu.org bug report #33965,
regarding handling of closed file descriptors
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
33965: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33965
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Bruno Haible <bruno <at> clisp.org>
To: bug-diffutils <at> gnu.org
Subject: handling of closed file descriptors
Date: Thu, 03 Jan 2019 20:42:28 +0100
[Message part 3 (text/plain, inline)]
There is a problem with the handling of closed file descriptors
in diff-3.7: As mentioned in [1], the 'new-file' test fails on HP-UX.
An investigation [2] shows that different coding techniques are needed,
depending on the desired outcome for closed file descriptors.

This patch uses a variant of (A) from [2]. Namely, the result of fcntl
can apparently be used to distinguish the substitute file descriptor
stuffed in by exec() from a regular open("/dev/null",O_RDONLY).

[1] https://lists.gnu.org/archive/html/diffutils-devel/2018-12/msg00019.html
[2] https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00012.html
[0001-Recognize-file-descriptors-closed-by-the-parent-proc.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 33965-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#33965: handling of closed file descriptors
Date: Thu, 3 Jan 2019 22:15:19 -0800
On Thu, Jan 3, 2019 at 11:43 AM Bruno Haible <bruno <at> clisp.org> wrote:
>
> There is a problem with the handling of closed file descriptors
> in diff-3.7: As mentioned in [1], the 'new-file' test fails on HP-UX.
> An investigation [2] shows that different coding techniques are needed,
> depending on the desired outcome for closed file descriptors.
>
> This patch uses a variant of (A) from [2]. Namely, the result of fcntl
> can apparently be used to distinguish the substitute file descriptor
> stuffed in by exec() from a regular open("/dev/null",O_RDONLY).
>
> [1] https://lists.gnu.org/archive/html/diffutils-devel/2018-12/msg00019.html
> [2] https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00012.html

Thank you. I have just pushed that with one tweak to the log message:
s/parent parent/parent/.


This bug report was last modified 6 years and 160 days ago.

Previous Next


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