Patchwork [1,of,4,V2] dispatch: remove stale comment about fdopen()-ed stdio

login
register
mail settings
Submitter Yuya Nishihara
Date Dec. 19, 2020, 2:49 a.m.
Message ID <a05f8740ce1faeda3f62.1608346157@lemosa>
Download mbox | patch
Permalink /patch/47936/
State Accepted
Headers show

Comments

Yuya Nishihara - Dec. 19, 2020, 2:49 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1608291311 -32400
#      Fri Dec 18 20:35:11 2020 +0900
# Node ID a05f8740ce1faeda3f6299c3cbf961be48652a06
# Parent  d109dda4a3e7bb1c6fa7de98b6872ddb80ec3827
dispatch: remove stale comment about fdopen()-ed stdio

On Python 3, stdout is just wrapped by LineBufferedWrapper.
Pulkit Goyal - Dec. 28, 2020, 8:03 a.m.
On Sat, Dec 19, 2020 at 8:19 AM Yuya Nishihara <yuya@tcha.org> wrote:
>
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1608291311 -32400
> #      Fri Dec 18 20:35:11 2020 +0900
> # Node ID a05f8740ce1faeda3f6299c3cbf961be48652a06
> # Parent  d109dda4a3e7bb1c6fa7de98b6872ddb80ec3827
> dispatch: remove stale comment about fdopen()-ed stdio
>
> On Python 3, stdout is just wrapped by LineBufferedWrapper.

Queued the series, many thanks!

Patch

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -207,9 +207,7 @@  if pycompat.ispy3:
             except IOError:
                 pass
             # Otherwise mark it as closed to silence "Exception ignored in"
-            # message emitted by the interpreter finalizer. Be careful to
-            # not close procutil.stdout, which may be a fdopen-ed file object
-            # and its close() actually closes the underlying file descriptor.
+            # message emitted by the interpreter finalizer.
             try:
                 fp.close()
             except IOError: