From: Johannes Schindelin <Johannes.Schindelin@gmx•de>
To: Tim Abdiukov <tabdiukov@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: Bug with bash and OpenSSL usage on Windows
Date: Tue, 13 Aug 2024 15:06:37 +0200 (CEST) [thread overview]
Message-ID: <074d1fb3-e2ef-6365-73cd-b63672b4842e@gmx.de> (raw)
In-Reply-To: <CAD+08a87xxVRxO1eiWiam-7xvq=AyKUB-MzqG-r=rM_SYbquBQ@mail.gmail.com>
Hi Tim,
I suspect that you also reported this issue at
https://github.com/git-for-windows/git/issues/5079. For the benefit of
readers of this list, here is the explanation:
`openssl.exe` is a pure Win32 program, while Git Bash uses a friendly fork
of the Cygwin POSIX emulation layer. The latter, therefore, uses emulated
pseudo terminals, but Win32 programs only use Win32 Consoles.
For the moment, therefore, programs like `openssl.exe` that want to
interact with the user via such a Win32 Console have to be called via the
`winpty` helper that acts as a translator between Win32 Consoles and
emulated Unix pseudo terminals.
Modern Windows versions support a concept called "pseudo consoles" that
are similar to Unix pseudo terminals, similar enough that there is an
option to use them, which would avoid the need for that `winpty` helper.
In the near future, the Git for Windows project will switch the default to
use those pseudo consoles by default (where available, that is).
Ciao,
Johannes
On Sat, 27 Jul 2024, Tim Abdiukov wrote:
> What did you do before the bug happened? (Steps to reproduce your issue)
> Tried to generate a self-signed certificate using git bash.
>
> Using git bash, I ran
> ```
> openssl genrsa -aes256 (private key location) 4096
> ```
> however, openssl just hung (on Windows). Cmd can execute this command,
> but bash cannot.
>
> What did you expect to happen? (Expected behavior)
>
> openssl to generate messages about key generation to stdout
>
> What happened instead? (Actual behavior)
>
> openssl just hung
>
> What's different between what you expected and what actually happened?
>
> openssl just hung, rendering it unusable within bash Windows
>
> Anything else you want to add:
>
> This is an issue specifically with Windows x64.
>
> Please review the rest of the bug report below.
> You can delete any lines you don't wish to share.
>
>
> [System Info]
> git version:
> git version 2.45.2.windows.1
> cpu: x86_64
> built from commit: 91d03cb2e4fbf6ad961ace739b8a646868cb154d
> sizeof-long: 4
> sizeof-size_t: 8
> shell-path: /bin/sh
> feature: fsmonitor--daemon
> uname: Windows 10.0 19044
> compiler info: gnuc: 14.1
> libc info: no libc information available
> $SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe
>
>
> [Enabled Hooks]
> not run from a git repository - no hooks to show
>
>
prev parent reply other threads:[~2024-08-13 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 19:40 Bug with bash and OpenSSL usage on Windows Tim Abdiukov
2024-07-26 19:48 ` Tim Abdiukov
2024-07-27 14:36 ` brian m. carlson
2024-07-27 15:53 ` Junio C Hamano
2024-07-27 15:58 ` Junio C Hamano
2024-07-27 16:05 ` Eric Sunshine
2024-07-27 21:20 ` brian m. carlson
2024-07-27 22:01 ` Jeff King
2024-08-13 13:06 ` Johannes Schindelin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=074d1fb3-e2ef-6365-73cd-b63672b4842e@gmx.de \
--to=johannes.schindelin@gmx$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=tabdiukov@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox