diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-12-29 11:12:10 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-12-29 17:41:39 +0100 |
commit | 6eb68a228b387334c259567589838257e2bbdaf9 (patch) | |
tree | 0c1e170d555d2643d10da6056fe79c2167fdfbad /exec | |
parent | 2c1299afbed9bc78e2d92565c334317622a68f01 (diff) | |
download | hurd-6eb68a228b387334c259567589838257e2bbdaf9.tar.gz hurd-6eb68a228b387334c259567589838257e2bbdaf9.tar.bz2 hurd-6eb68a228b387334c259567589838257e2bbdaf9.zip |
Replace deprecated sigmask with sigset_t calls
Message-ID: <20231229161211.312389-2-flaviocruz@gmail.com>
Diffstat (limited to 'exec')
-rw-r--r-- | exec/hashexec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/exec/hashexec.c b/exec/hashexec.c index 9e00704e..a1072917 100644 --- a/exec/hashexec.c +++ b/exec/hashexec.c @@ -53,6 +53,11 @@ check_hashbang (struct execdata *e, size_t new_argvlen; mach_port_t *new_dtable = NULL; mach_msg_type_number_t new_dtablesize; + sigset_t arg_env_sigset; + + sigemptyset (&arg_env_sigset); + sigaddset (&arg_env_sigset, SIGSEGV); + sigaddset (&arg_env_sigset, SIGBUS); file_t user_fd (int fd) { @@ -293,7 +298,7 @@ check_hashbang (struct execdata *e, if (strchr (name, '/') != NULL) error = lookup (name, 0, &name_file); else if ((error = hurd_catch_signal - (sigmask (SIGBUS) | sigmask (SIGSEGV), + (arg_env_sigset, (vm_address_t) envp, (vm_address_t) envp + envplen, &search_path, SIG_ERR))) name_file = MACH_PORT_NULL; @@ -416,7 +421,7 @@ check_hashbang (struct execdata *e, } /* Set up the arguments. */ - hurd_catch_signal (sigmask (SIGSEGV) | sigmask (SIGBUS), + hurd_catch_signal (arg_env_sigset, (vm_address_t) argv, (vm_address_t) argv + argvlen, &setup_args, &fault_handler); } |