Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport console fixes #65

Merged
merged 5 commits into from
Feb 14, 2024
Merged

Commits on Feb 13, 2024

  1. Work around fragile #include in binutils

    The `bfd.h` header file that is included in `binutils` has the line
    `#include "ansidecl.h"`, which is fragile because it prefers Cygwin's
    `include/ansidecl.h` (as opposed to `#include <ansidecl.h>`, which would
    only look in the system include paths).
    
    This matters because as of v2.42, `bfd.h` also makes use of the
    `ATTRIBUTE_WARN_UNUSED_RESULT` macro.
    
    So let's just copy that macro (and while at it, the other `ATTRIBUTE_*`
    macros) from binutils' `ansidecl.h` file, to avoid compile errors while
    compiling `dumper.o` that look like this:
    
      /usr/include/bfd.h:2770:1: error: expected initializer before ‘ATTRIBUTE_WARN_UNUSED_RESULT’
       2770 | ATTRIBUTE_WARN_UNUSED_RESULT;
            | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    ac955c4 View commit details
    Browse the repository at this point in the history
  2. Cygwin: console: Avoid slipping past disable_master_thread check.

    If disable_master_thread flag is set between the code checking that
    flag not be set and the code acquiring input_mutex, input record is
    processed once after setting disable_master_thread flag. This patch
    prevents that.
    
    Fixes: d4aacd5 ("Cygwin: console: Add missing input_mutex guard.")
    Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    tyan0 authored and dscho committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    0028ae3 View commit details
    Browse the repository at this point in the history
  3. Cygwin: pty: Fix handle leak in master process.

    If non-cygwin process is started in pty, closing from_master_nat
    pipe handle was missing in fhandler_pty_slave::input_transfer().
    This occured because the handle was duplicated but not closed.
    
    msys2/msys2-runtime#198
    
    Fixes: 29431fc ("Cygwin: pty: Inherit typeahead data between two input pipes.")
    Reported-by: Hakkin Lain
    Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    tyan0 authored and dscho committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    915e146 View commit details
    Browse the repository at this point in the history
  4. Cygwin: pty: Fix potential handle leak regarding CallNamedPipe().

    In pty master_thread, 6 handles are duplicated when CallNamedPipe()
    requests that. Though some of them are not used so should be closed,
    they were not. This causes handle leak potentially.
    
    Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    tyan0 authored and dscho committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    9bf75c4 View commit details
    Browse the repository at this point in the history
  5. Cygwin: console: Make VMIN and VTIME work.

    Previously, VMIN and VTIME did not work at all. This patch fixes that.
    
    Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    tyan0 authored and dscho committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    c292b3d View commit details
    Browse the repository at this point in the history