You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mi...@apache.org on 2024/05/14 07:20:11 UTC

(commons-daemon) branch DAEMON-464 created (now c5939cf)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch DAEMON-464
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git


      at c5939cf  [DAEMON-464] struct sigaction function pointer causes build failures on LLVM 15+

This branch includes the following new commits:

     new c5939cf  [DAEMON-464] struct sigaction function pointer causes build failures on LLVM 15+

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(commons-daemon) 01/01: [DAEMON-464] struct sigaction function pointer causes build failures on LLVM 15+

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch DAEMON-464
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git

commit c5939cfe63d9fcfb0e5950a296d6aad857ea0ad1
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue May 14 09:19:51 2024 +0200

    [DAEMON-464] struct sigaction function pointer causes build failures on LLVM 15+
    
    Co-authored-by: Matthew Ryan <ma...@akamai.com>
    
    This closes #166 and #170
---
 src/native/unix/native/jsvc-unix.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/native/unix/native/jsvc-unix.c b/src/native/unix/native/jsvc-unix.c
index e331a0f..88e071f 100644
--- a/src/native/unix/native/jsvc-unix.c
+++ b/src/native/unix/native/jsvc-unix.c
@@ -86,7 +86,7 @@ static int lockf(int fildes, int function, off_t size)
 
 #endif
 
-static void handler(int sig)
+static void handler(int sig, siginfo_t * sip, void *ucp)
 {
     switch (sig) {
         case SIGTERM:
@@ -901,7 +901,7 @@ static int child(arg_data *args, home_data *data, uid_t uid, gid_t gid)
 
     /* Install signal handlers */
     memset(&act, '\0', sizeof(act));
-    act.sa_handler = handler;
+    act.sa_sigaction = handler;
     sigemptyset(&act.sa_mask);
     act.sa_flags = SA_RESTART | SA_NOCLDSTOP;
 
@@ -1308,7 +1308,7 @@ static int run_controller(arg_data *args, home_data *data, uid_t uid, gid_t gid)
      * These will be replaced in the child process.
      */
     memset(&act, '\0', sizeof(act));
-    act.sa_handler = controller;
+    act.sa_sigaction = controller;
     sigemptyset(&act.sa_mask);
     act.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_SIGINFO;