logoalt Hacker News

pipesyesterday at 6:18 PM3 repliesview on HN

Always wondered if git bash was cygwin, I don't think it is, but it seems very similar.


Replies

okanatyesterday at 8:37 PM

Git Bash is an MSYS2 environment that ships `bash.exe`. The rest of the Git-for-Windows executables are native Windows executables compiled with Mingw-w64 (aka GCC for Windows). Except for Bash nothing runs under POSIX simulation provided by MSYS2 runtime. MSYS2 runtime is a fork of Cygwin.

I explained the differences here: https://news.ycombinator.com/item?id=48375716

rzzztyesterday at 6:54 PM

Cygwin executables need cygwin1.dll to run while MSYS-based distributions are using Windows APIs directly. One major difference is around process management: in Cygwin fork() is implemented* while MSYS2 packages will need to use whatever the NT kernel provides (i.e. also need to modify the source to build for this target): https://stackoverflow.com/questions/985281/what-is-the-close...

show 1 reply
Thoreandanyesterday at 6:51 PM

Close, it's MinGW/msys - different pathname semantics and under-the-hood approaches.