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

[PATCH 0/6] Pass t5530 on Windows

From
Johannes Sixt <j6t@kdbg.org>
Date
Mar 6, 2010, 15:40 UTC
Message-ID
<cover.1267889072.git.j6t@kdbg.org>

The goal of this series is to fix async procedures to the extent that t5530-upload-pack-error.sh passes on Windows.

The problem is that on Windows async procedures are run in threads (due to the lack of fork()), and a die() call from an async procedure tears down the whole process while on POSIX only the async procedure is terminated.

The approach taken is to use a custom die routine that exits only the thread when it detects that it is not called from the main procedure.

As a bonus, the threaded async infrastructure now uses pthreads instead of Windows specific API, and can be enabled on POSIX as well through a new compile-time option.

Quite frankly, I don't quite know what to do with this series. On the one hand, it is a clean-up, but in practice it is not relevant whether die() kills only the async thread or the whole process because all callers of async die() themselves anyway when the async procedure died. On the other hand, it does enable threaded async procedures on POSIX...

Johannes Sixt (6):
  Modernize t5530-upload-pack-error.
  Make report() from usage.c public as vreportf() and use it.
  Fix signature of fcntl() compatibility dummy
  Windows: more pthreads functions
  Reimplement async procedures using pthreads
  Dying in an async procedure should only exit the thread, not the
    process.
 Makefile                     |    5 +++
 compat/mingw.h               |    2 +-
 compat/win32/pthread.c       |    8 ++++
 compat/win32/pthread.h       |   25 ++++++++++++++
 fast-import.c                |    8 ++---
 git-compat-util.h            |    1 +
 http-backend.c               |    5 +--
 run-command.c                |   75 ++++++++++++++++++++++++++++++++----------
 run-command.h                |    8 +++-
 t/t5530-upload-pack-error.sh |   18 +++++-----
 usage.c                      |   10 +++---
 11 files changed, 121 insertions(+), 44 deletions(-)
Next: Junio C Hamano
Message 1 of 16 in “Pass t5530 on Windows”
  1. 0/6 Pass t5530 on WindowsJohannes Sixt, Mar 6, 2010
  2. Junio C HamanoMar 6, 2010
  3. Shawn O. PearceMar 6, 2010
  4. 7/6 Enable threaded async procedures whenever pthreads is availableJohannes Sixt, Mar 9, 2010
  5. Shawn O. PearceMar 9, 2010
  6. Junio C HamanoMar 10, 2010
  7. Johannes SixtMar 11, 2010
  8. Junio C HamanoMar 12, 2010
  9. Johannes SixtMar 17, 2010
  10. Junio C HamanoMar 17, 2010
  11. Fredrik KuivinenMar 23, 2010
  12. Johannes SixtMar 23, 2010
  13. Johannes SixtMar 23, 2010
  14. Junio C HamanoMar 23, 2010
  15. Johannes SixtMar 23, 2010
  16. Fredrik KuivinenMar 23, 2010

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.