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

Re: [PATCH v3 0/9] replace signal() with sigaction()

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jun 2, 2014, 11:28 UTC
Message-ID
<538C5FD9.1010706@viscovery.net>
In-Reply-To
<cover.1401645403.git.jmmahler@gmail.com>
Am 6/1/2014 20:10, schrieb Jeremiah Mahler:
Show 30 quoted lines
> This is version 3 of the patch set to convert signal(2) to sigaction(2)
> (previous discussion [1]).
> 
> [1]: http://marc.info/?l=git&m=140148352416926&w=2
> 
> Changes in this revision include:
> 
>   - Using NULL pointers instead of 0 as per the
>     Documentation/CodingGuidlines pointed out by Chris Packham.
> 
>     sigaction(SIGCHLD, &sa, NULL);
> 
>   - Conversion of all remaining files which used signal().
> 
>   - sigchain.c required the most changes.  Both the old signal handler
>     was used and the return value from signal() was being checked.
>     signal() would return the previous error handler which would be
>     SIG_ERR if an error occurred.  sigaction() just returns -1 in this
>     case.
> 
> Jeremiah Mahler (9):
>   compat/mingw.c: expand MinGW support for sigaction
>   connect.c: replace signal() with sigaction()
>   progress.c: replace signal() with sigaction()
>   write_or_die.c: replace signal() with sigaction()
>   daemon.c: replace signal() with sigaction()
>   builtin/log.c: replace signal() with sigaction()
>   builtin/merge-index.c: replace signal() with sigaction()
>   builtin/verify-tag.c: replace signal() with sigaction()
>   sigchain.c: replace signal() with sigaction()
The series without patch 9/9 works on Windows so far.

Without patch patch 9/9 and a more complete implementation of sigaction in compat/mingw.c the series misses its goal. But even if you complete it, it is IMHO only code churn without practical merits.

-- Hannes
Show 11 quoted lines
> 
>  builtin/log.c         |  6 +++++-
>  builtin/merge-index.c |  5 ++++-
>  builtin/verify-tag.c  |  5 ++++-
>  compat/mingw.c        |  9 +++++----
>  connect.c             |  5 ++++-
>  daemon.c              | 16 +++++++++++++---
>  progress.c            |  6 +++++-
>  sigchain.c            | 14 +++++++++++---
>  write_or_die.c        |  6 +++++-
>  9 files changed, 56 insertions(+), 16 deletions(-)
Previous: Jeremiah MahlerNext: Jeremiah Mahler
Message 12 of 15 in “replace signal() with sigaction()”
  1. 0/9 replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  2. 1/9 compat/mingw.c: expand MinGW support for sigactionJeremiah Mahler, Jun 1, 2014
  3. Johannes SixtJun 2, 2014
  4. 2/9 connect.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  5. 3/9 progress.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  6. 4/9 write_or_die.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  7. 5/9 daemon.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  8. 6/9 builtin/log.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  9. 7/9 builtin/merge-index.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  10. 8/9 builtin/verify-tag.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  11. 9/9 sigchain.c: replace signal() with sigaction()Jeremiah Mahler, Jun 1, 2014
  12. Johannes SixtJun 2, 2014
  13. Jeremiah MahlerJun 2, 2014
  14. Junio C HamanoJun 2, 2014
  15. Jeremiah MahlerJun 2, 2014

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.