Skip to content
Advertisement

Tag: signals

timer_create() not able to catch a signal in handler function

Here i am trying achieve a timer say 0-10secs and an interval of 2secs each,so that i need to generate an interrupt @ every 2secs(total 5 times) saying 2secs completed. which i have been cross checking in handler() function by using printf(). But i am not able to achieve the desired result.please put me touch if anyone is aware of

Why is SIGFPE not triggered after adding a printf line?

I am playing with a simple program (source code below). And my computer configuration: Linux mymachine 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) I intend to trigger the SIGFPE in this program by calling the executable in this way: As you can see, the SIGFPE is successfully triggered. However,

sigaction’s signal handler not called in child process

I’ve a program, which installs a signal handler for SIGSEGV. In signal handler ( I try to catch crash ) I restart my application. But when my application is resurrected it doesn’t handle SIGSEGV anymore. Here’s an example: what I get in output is: So I can see sighandler was set in right way, but resurrected app simply crashed silently.

SigCgt value is not getting updated in /proc//status file?

I have read about the signal handling in linux processes. I am using centOS 7.1 (kernel 3.10+). I am registering handler only for SIGTERM in my c++ program. As per my knowledge(not sure if my assumptions are correct). We can check all the signals a process is listening to in /proc/$pid/status file by using SigCgt field mask. My process’s /proc/$pid/status

Which system calls are not interrupted by a signal?

AFAIK, most of the system calls on linux/unix are interrupted when a signal is received. According to the blog post below, there are some system calls that are not interrupted: In general function that return immediately (don’t wait for any I/O operation to complete or sleep) are not interruptible like socket(2) which just allocates a socket and doesn’t wait for

Send signal to other process

since os/signal is only for handling of incoming signals I’m asking if there is a native way to send signals to other processes? Edit: The process I want to mange is nginx. My Go application should listen for some events and then send a SIGHUP to nginx to reload its configuration Answer If you have created process with os.StartProcess or

How to register a signal handler for a subprocess?

Adding a signal handler, e.g. with process.sh doesn’t work because CtrlC interrupts the child process (only SIGINT received is printed), but both SIGINT received and SIGINT child received should be printed and the child continue to run. Adding signal.SIG_IGN leaves the child untouched, but that not sufficient since I need to write a custom handler for the child. I don’t

Safe global state for signal handling

I am toying around with Rust and various UNIX libraries. A use-case that I have right now is that I want to react to POSIX signals. To keep things reasonable I want to create an abstraction over the signal handling so that the rest of my program doesn’t have to worry about them as much. Let’s call the abstraction SignalHandler:

Advertisement