git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 7/7] t/helper/simple-ipc: convert test-simple-ipc to use start_bg_command

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 16, 2021, 10:56 UTC
Message-ID
<nycvar.QRO.7.76.6.2111161152310.21127@tvgsbejvaqbjf.bet>
In-Reply-To
<CA+kUOa=FBpzy4zNMXY1UZybc+13mwLnXrZRVN5HP+NF3h4PYow@mail.gmail.com>
Hi,
On Fri, 12 Nov 2021, Adam Dinwoodie wrote:
Show 43 quoted lines
> On Fri, 12 Nov 2021 at 16:01, Junio C Hamano <gitster@pobox.com> wrote:
> >
> > Out of curiosity, are the use cases and user base of Cygwin waning,
> > or are there still viable cases where Cygwin is a more preferred
> > solution over WSL (the question is not limited to use of Git)?
>
> No formal research here, just impressions as someone who has used
> Cygwin for a long time and who hangs out on the Cygwin mailing list:
> for a lot of use cases, WSL is at least as good, if not better, than
> Cygwin. There are a few areas where Cygwin is still a better solution,
> though:
>
> - WSL requires essentially installing an entire operating system. Disk
> space is relatively cheap, so that's not nearly the obstacle it used
> to be, but it is an obstacle. This is more relevant for people who
> want to distribute packaged installers to Windows users: most
> non-technical users won't want to get WSL working, but if you've
> written code for *nix and don't want to port it manually to Windows,
> it's relatively straightforward to compile it using Cygwin and bundle
> the cygwin1.dll file with the installer. That'll mostly get your code
> working with a user experience that doesn't differ too much from a
> fully native Windows application. (This is essentially what Git for
> Windows is doing, albeit with an increasingly distant Cygwin fork.)
>
> - There are some functions that Cygwin offers that WSL doesn't. The
> key one for me is the ability to access Windows network file shares,
> which WSL doesn't support (or at least didn't last time I checked). I
> expect some of these gaps will disappear as WSL gets more features,
> but I expect some of them are fairly fundamental restrictions: Cygwin
> applications can have code specifically to handle the fact that
> there's a Windows OS there, so they can -- with care -- interact with
> the Windows OS directly to (say) use Windows file access APIs or the
> Windows clipboard. WSL applications generally don't have that ability;
> if I install something from apt on my Debian WSL installation, it'll
> pull exactly the same binary as if I'd installed it on a normal Debian
> system. I guess in theory people could write code to detect that
> they're running in WSL and handle that specially, in the same way that
> it's normally possible to detect and handle when you're running in a
> VM versus running on bare metal. I expect that'll be much less common,
> though, just as Git has code for handling Cygwin specially but doesn't
> have code for handling Linux-within-WSL specially, even though both
> could be used to access a Git repository stored in the same Windows
> NTFS directory.

I would like to add two additional scenarios where Cygwin needs to be used instead of WSL:

- In order to install WSL, you need to switch your machine to Developer
  Mode, which requires administrative privileges (which not evey developer
  enjoys, and given recent and not so recent security news, maybe that's a
  good thing, too). Cygwin does not require administrative privileges.
- There is (finally!) a way to run graphical Linux applications in WSL,
  but it requires Windows 11. That excludes many existing Windows users.

So yeah, I think Cygwin is here to stay. Besides, as long as I don't find any better way to have a POSIX-compliant shell (Git will continue to depend on one for a long, long time, I expect), Git for Windows will indirectly _have_ to depend on Cygwin (Git for Windows bundles a Bash using the MSYS2 runtime, which is a very close fork of the Cygwin runtime).

Ciao, Dscho

Previous: Adam DinwoodieNext: Johannes Schindelin
Message 57 of 66 in “Builtin FSMonitor Part 1”
  1. 0/7 Builtin FSMonitor Part 1Jeff Hostetler via GitGitGadget, Sep 15, 2021
  2. 4/7 simple-ipc/ipc-win32: add trace2 debuggingJeff Hostetler via GitGitGadget, Sep 15, 2021
  3. Ævar Arnfjörð BjarmasonSep 16, 2021
  4. Jeff HostetlerSep 17, 2021
  5. 6/7 run-command: create start_bg_commandJeff Hostetler via GitGitGadget, Sep 15, 2021
  6. Taylor BlauSep 16, 2021
  7. Taylor BlauSep 16, 2021
  8. Ævar Arnfjörð BjarmasonSep 16, 2021
  9. 5/7 simple-ipc/ipc-win32: add Windows ACL to named pipeJeff Hostetler via GitGitGadget, Sep 15, 2021
  10. Ævar Arnfjörð BjarmasonSep 16, 2021
  11. Jeff HostetlerSep 17, 2021
  12. Ævar Arnfjörð BjarmasonSep 17, 2021
  13. 1/7 trace2: fix memory leak of thread nameJeff Hostetler via GitGitGadget, Sep 15, 2021
  14. Junio C HamanoSep 15, 2021
  15. Taylor BlauSep 16, 2021
  16. Ævar Arnfjörð BjarmasonSep 16, 2021
  17. Taylor BlauSep 16, 2021
  18. Ævar Arnfjörð BjarmasonSep 16, 2021
  19. Jeff HostetlerSep 16, 2021
  20. Ævar Arnfjörð BjarmasonSep 16, 2021
  21. Junio C HamanoSep 16, 2021
  22. 3/7 simple-ipc: move definition of ipc_active_state outside of ifdefJeff Hostetler via GitGitGadget, Sep 15, 2021
  23. Junio C HamanoSep 15, 2021
  24. Jeff HostetlerSep 17, 2021
  25. Carlo ArenasSep 18, 2021
  26. Junio C HamanoSep 20, 2021
  27. 2/7 simple-ipc: preparations for supporting binary messages.Jeff Hostetler via GitGitGadget, Sep 15, 2021
  28. Eric SunshineSep 15, 2021
  29. Jeff HostetlerSep 17, 2021
  30. 7/7 t/helper/simple-ipc: convert test-simple-ipc to use start_bg_commandJeff Hostetler via GitGitGadget, Sep 15, 2021
  31. Taylor BlauSep 16, 2021
  32. Jeff HostetlerSep 17, 2021
  33. Ævar Arnfjörð BjarmasonSep 18, 2021
  34. Ævar Arnfjörð BjarmasonSep 16, 2021
  35. 0/7 Builtin FSMonitor Part 1Jeff Hostetler via GitGitGadget, Sep 20, 2021
  36. 1/7 trace2: add trace2_child_ready() to report on background childrenJeff Hostetler via GitGitGadget, Sep 20, 2021
  37. 2/7 simple-ipc: preparations for supporting binary messages.Jeff Hostetler via GitGitGadget, Sep 20, 2021
  38. 3/7 simple-ipc: move definition of ipc_active_state outside of ifdefJeff Hostetler via GitGitGadget, Sep 20, 2021
  39. 4/7 simple-ipc/ipc-win32: add trace2 debuggingJeff Hostetler via GitGitGadget, Sep 20, 2021
  40. 6/7 run-command: create start_bg_commandJeff Hostetler via GitGitGadget, Sep 20, 2021
  41. 5/7 simple-ipc/ipc-win32: add Windows ACL to named pipeJeff Hostetler via GitGitGadget, Sep 20, 2021
  42. 7/7 t/helper/simple-ipc: convert test-simple-ipc to use start_bg_commandJeff Hostetler via GitGitGadget, Sep 20, 2021
  43. Ævar Arnfjörð BjarmasonSep 23, 2021
  44. Jeff HostetlerSep 23, 2021
  45. Junio C HamanoSep 23, 2021
  46. Adam DinwoodieNov 4, 2021
  47. Ramsay JonesNov 4, 2021
  48. Jeff HostetlerNov 8, 2021
  49. Johannes SchindelinNov 8, 2021
  50. Ramsay JonesNov 9, 2021
  51. Johannes SchindelinNov 9, 2021
  52. Junio C HamanoNov 9, 2021
  53. Johannes SchindelinNov 10, 2021
  54. Adam DinwoodieNov 12, 2021
  55. Junio C HamanoNov 12, 2021
  56. Adam DinwoodieNov 12, 2021
  57. Johannes SchindelinNov 16, 2021
  58. Johannes SchindelinNov 16, 2021
  59. Ramsay JonesNov 13, 2021
  60. Ramsay JonesNov 14, 2021
  61. Adam DinwoodieNov 14, 2021
  62. Ævar Arnfjörð BjarmasonSep 23, 2021
  63. Jeff HostetlerSep 23, 2021
  64. Ævar Arnfjörð BjarmasonSep 23, 2021
  65. Jeff HostetlerSep 27, 2021
  66. Taylor BlauSep 23, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.