search for: sigaddset

Displaying 20 results from an estimated 40 matches for "sigaddset".

2002 Jan 02
2
macosx (lots of little changes)
...system may not be supported.]) ]) ]) <p>macosx doesn't seem to have pthread_sigmask(). this is not a perfect solution, I can't ^C out of ogg123. --- ogg123/buffer.c.orig Wed Jan 2 01:21:20 2002 +++ ogg123/buffer.c Tue Jan 1 16:15:31 2002 @@ -75,7 +75,11 @@ sigaddset(&set, SIGINT); sigaddset(&set, SIGTSTP); sigaddset(&set, SIGCONT); +#ifdef __APPLE__ + if (sigprocmask(SIG_BLOCK, &set, NULL) != 0 ) +#else if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) +#endif DEBUG("pthread_sigmask failed"); } I was getting s...
2002 Jan 02
2
macosx (lots of little changes)
...system may not be supported.]) ]) ]) <p>macosx doesn't seem to have pthread_sigmask(). this is not a perfect solution, I can't ^C out of ogg123. --- ogg123/buffer.c.orig Wed Jan 2 01:21:20 2002 +++ ogg123/buffer.c Tue Jan 1 16:15:31 2002 @@ -75,7 +75,11 @@ sigaddset(&set, SIGINT); sigaddset(&set, SIGTSTP); sigaddset(&set, SIGCONT); +#ifdef __APPLE__ + if (sigprocmask(SIG_BLOCK, &set, NULL) != 0 ) +#else if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) +#endif DEBUG("pthread_sigmask failed"); } I was getting s...
2017 Jun 10
1
[PATCH] lib: direct, uml: Unblock SIGTERM in the hypervisor and recovery processes (RHBZ#1460338).
...to do this. @@ -728,6 +729,13 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) close_file_descriptors (fd > 2); } + /* Unblock the SIGTERM signal since we will need to send that to + * the subprocess (RHBZ#1460338). + */ + sigemptyset (&sigset); + sigaddset (&sigset, SIGTERM); + sigprocmask (SIG_UNBLOCK, &sigset, NULL); + /* Dump the command line (after setting up stderr above). */ if (g->verbose) qemuopts_to_channel (qopts, stderr); @@ -781,6 +789,13 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)...
2015 Aug 21
0
Problem with psignal.c for Windows builds
...ile src/ghuwin32/psignal.c (used only in Windows builds) fails to use the sigset_t type in all places where it should, using "int" some places instead. Here is a diff of the needed corrections: @@ -253,7 +253,7 @@ sighandler_t signal(int signal_Number, sighandler_t signal_Handler) int sigaddset(sigset_t* sigset_Info,int signal_Number) { if (IS_SIGNAL(signal_Number)) { - (*sigset_Info) |= (1 << (signal_Number - 1)); + (*sigset_Info) |= ((sigset_t)1 << (signal_Number - 1)); return 0; } else { @@ -267,7 +267,7 @@ int sigaddset(sigset_t* sigset_...
2006 May 28
0
sigbus fault ?
...iginfo: SIGBUS BUS_ADRALN addr=0x0032DFCF ^^^^^^^ /1: Received signal #10, SIGBUS [caught] /1: siginfo: SIGBUS BUS_ADRALN addr=0x0032DFCF /1@1: -> libc:sigaddset(0xffbfd594, 0xa, 0x0, 0x0) /1@1: -> libc:sigvalid(0xa, 0x0, 0x0, 0x0) /1@1: <- libc:sigvalid() = 1 /1@1: <- libc:sigaddset() = 0 /1: sigprocmask(SIG_SETMASK, 0xFFBFD594, 0x00000000) = 0 /1@1: -> libc:___errno(0x0, 0x0, 0x0,...
2011 Aug 16
2
[PATCH] test: Add signal nodefer
...quot;); +} + +int main(int argc, char **argv) +{ + pid_t pid; + + pid = fork(); + if (pid == -1) { + perror("fork"); + exit(EXIT_FAILURE); + } else if (!pid) { + struct sigaction act; + + memset(&act, 0, sizeof(act)); + act.sa_handler = handler; + act.sa_flags = SA_NODEFER; + + sigaddset(&act.sa_mask, SIGUSR2); + sigaddset(&act.sa_mask, SIGTERM); + + sigaction(SIGUSR1, &act, NULL); + + pause(); + } else { + int status; + + sleep(3); + kill(pid, SIGUSR1); + waitpid(pid, &status, 0); + } + + return 0; +} -- 1.7.5.4
2006 May 28
1
sigbus fault?
...siginfo: SIGBUS BUS_ADRALN addr=0x0032DFCF ^^^^^^^ /1: Received signal #10, SIGBUS [caught] /1: siginfo: SIGBUS BUS_ADRALN addr=0x0032DFCF /1@1: -> libc:sigaddset(0xffbfd594, 0xa, 0x0, 0x0) /1@1: -> libc:sigvalid(0xa, 0x0, 0x0, 0x0) /1@1: <- libc:sigvalid() = 1 /1@1: <- libc:sigaddset() = 0 /1: sigprocmask(SIG_SETMASK, 0xFFBFD594, 0x00000000) = 0 /1@1: -> libc:___errno(0x0, 0x0, 0x0,...
2016 Feb 16
2
[PATCH] fish: reset the console on ^Z RHBZ#1213844
Patch registers SIGTSTP hook where it sends reset terminal color control sequence. Maros Zatko (1): fish: reset the console on ^Z RHBZ#1213844 fish/fish.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) -- 2.5.0
2011 May 29
2
nearly-tickless-tinc
Hi, tinc has a fixed timeout of 1 second for select() in the main loop. I think this could be improved. Do you think the following patch goes into the right direction ? I don't know whether pselect() is standard enough (works under "current" linux, however I don't know about the other arches). Maybe a config option is necessary. It's probably possible
2020 Aug 28
0
[klibc:ia64-signal-fix] ia64: sigaction: Make signal updates atomic
...on *oact, size_t size) { + sigset_t signal_mask, old_signal_mask; uintptr_t old_entry; int rv; @@ -29,6 +30,13 @@ int __rt_sigaction(int sig, const struct sigaction *act, return -1; } + /* Mask the signal to avoid races on access to its descriptor */ + sigemptyset(&signal_mask); + sigaddset(&signal_mask, sig); + rv = sigprocmask(SIG_BLOCK, &signal_mask, &old_signal_mask); + if (rv) + return -1; + if (oact) { old_entry = signal_descriptors[sig].entry; } @@ -41,6 +49,12 @@ int __rt_sigaction(int sig, const struct sigaction *act, rv = ____rt_sigaction(sig, act, oa...
2020 Aug 29
0
[klibc:master] ia64: sigaction: Make signal updates atomic
...igaction *oact, size_t size) { + sigset_t signal_mask, old_signal_mask; uintptr_t old_entry; int rv; @@ -29,6 +30,13 @@ int __rt_sigaction(int sig, struct sigaction *act, return -1; } + /* Mask the signal to avoid races on access to its descriptor */ + sigemptyset(&signal_mask); + sigaddset(&signal_mask, sig); + rv = sigprocmask(SIG_BLOCK, &signal_mask, &old_signal_mask); + if (rv) + return -1; + if (oact) { old_entry = signal_descriptors[sig].entry; } @@ -41,6 +49,12 @@ int __rt_sigaction(int sig, struct sigaction *act, rv = ____rt_sigaction(sig, act, oact, si...
2016 Feb 16
0
[PATCH] fish: reset the console on ^Z RHBZ#1213844
..._LIBREADLINE + /* Cleanup readline, unhook from terminal */ + rl_free_line_state (); + rl_cleanup_after_signal (); +#endif + + /* Reset terminal color */ +#define RESETCOLOR "\033[0m" + printf (RESETCOLOR); + fflush (stdout); + + /* Unblock SIGTSTP. */ + sigemptyset (&set); + sigaddset (&set, SIGTSTP); + sigprocmask (SIG_UNBLOCK, &set, NULL); + + restore_stophandler (); + + /* Stop ourselves. */ + kill (0, SIGTSTP); + + /* Now we're stopped ... */ + + /* Reset the curses SIGTSTP signal handler. */ + set_stophandler (); + +#ifdef HAVE_LIBREADLINE + /* Restore r...
2009 Mar 24
0
Issue with child process exits
...se of this method is to set a value for child_terminated which is referenced by the following method: static void collect_children(void) { #ifndef HAVE_NETWARE pid_t pid; sigset_t oset, nset; int status; /* block SIGCHLD while we check for dead children */ sigemptyset(&nset); sigaddset(&nset, SIGCHLD); sigprocmask(SIG_BLOCK, &nset, &oset); if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || (pid < 0 && errno == EINTR)) if (pid > 0) session_close_by_pid(pid, status); child_terminated = 0; } sigprocmask(SIG_SETMASK,...
1998 May 14
1
R-beta: ctrl-c
A non-text attachment was scrubbed... Name: not available Type: text Size: 668 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/19980514/af07cf17/attachment.pl
2000 Jan 24
0
OpenSSH on OpenStep 4.2 -- Mostly working!!! =)
I have an initial port of the SSH client. Only one known issue with it. sigaddset(), sigempty(), and sigprocmask() don't exist on NeXT without using libposix which I'm now avoiding (thanks, Garance A Drosehn) like the plague because it conflicts too much. Only thing this affects is the readpass.c file at this point. Which means if you ctrl-C out of the password prompt...
2005 Jan 19
1
sshd hangs
...FFBEEF28, 2, -1) (sleeping...) it seems there is another problem here with collect_children() not handling ECHILD: { pid_t pid; sigset_t oset, nset; int status; /* block SIGCHLD while we check for dead children */ sigemptyset(&nset); sigaddset(&nset, SIGCHLD); sigprocmask(SIG_BLOCK, &nset, &oset); if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || (pid < 0 && errno == EINTR)) if (pid > 0)...
2005 Jan 24
0
AW: sshd hangs
...lt;PLT=libc.so.1`select> 0x1f27c: clr %o3 c code (patched): static void collect_children(void) { pid_t pid; sigset_t oset, nset; int status; /* block SIGCHLD while we check for dead children */ sigemptyset(&nset); sigaddset(&nset, SIGCHLD); sigprocmask(SIG_BLOCK, &nset, &oset); if (child_terminated) { while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || (pid < 0 && errno == EINTR)) if (pid > 0)...
2016 Mar 08
1
[PATCH] fish: reset the console on ^Z RHBZ#1213844
Patch registers SIGTSTP hook where it sends reset terminal color control sequence using write and fsync. Handler is installed only if signal is not being ignored. Patch uses rl_free_line_state and rl_cleanup_after_signal to unhook readline from terminal, then it calls original TSTP handler using approach in URL below and again hooks readline using rl_reset_after_signal. Handling is based on code
2000 Jan 27
1
Long awaited round 1 of NeXT patches.
...). BTW, this patch is against 1.2.2 (since it was released before I was able to relase my patch. =) Known issues with my port (and my internal tree): 1) lack of utmp entries. I think I know what is wrong. 2) lack of signal capturing in readpass.c (I omited this from the patch) due to lack of sigaddset, sigemtyset, and sigprocmask functions outside of using libposix. 3) lost of warning. Most are ignorable. 4) Current patch *IS NOT* complete enough to support out of box next compiling. But it works against 1.2.2x ssh both client/server and works with itself. So it's progress. ------------...
2009 Jan 29
1
Problem building Samba 3.3 on Solaris 10
...talloc.o localtime lib/replace/strptime.o tcsetattr lib/replace/getpass.o setvbuf lib/replace/getpass.o strncasecmp lib/replace/replace.o toupper lib/replace/replace.o sigaddset lib/replace/getpass.o tcgetattr lib/replace/getpass.o ld: fatal: Symbol referencing errors. No output written to bin/libtalloc.so.1 gmake: *** [bin/libtalloc.so.1] Error 1 -- John Center Villanova University