Questions tagged [signal-handling]

In the C Standard Library, signal processing defines how a program handles various signals while it executes. A signal can report some exceptional behavior within the program (such as division by zero), or a signal can report some asynchronous event outside the program (such as someone striking an interactive attention key on a keyboard).

Filter by
Sorted by
Tagged with
4
votes
1answer
58 views

Suspend and resume a thread using signals

The other day I ran into this question on stackoverflow. Just for curiosity I wanted to implement suspending and resuming the thread, so I used signals and used ...
2
votes
1answer
2k views

Dynamically Change Logging Level of a Python Process

The intention of following code is to dynamically change the logging level of a running python process that has imported this module. ...
5
votes
1answer
2k views

Safely and elegantly handling UNIX signals in Qt applications

When you search the web on how to gracefully shut down your Qt application when receiving SIGTERM, you are invariably directed towards this informative, yet ...
3
votes
0answers
677 views

SIGCONT Handler for terminal application

I'm writing a C++ application for POSIX environment with terminal-based User Interface. I'd like to make my application's UI be consistent between Ctrl-Z and ...
3
votes
1answer
43 views

Bash script that displays and kills selected processes

This is my first Bash script and I decided to use what I've learned so far to help manage stray processes while I develop in my *nix environs. I've tested the script extensively and it seems to work ...
2
votes
1answer
185 views

Git post-receive hook writen as a POSIX shell script (utilising a named pipe)

This is my first piece of code to post here. I wrote this script as a post-receive hook for a Git repository but I’m not so concerned with the Git parts (I’d like to have the part marked with ...
8
votes
1answer
1k views

Freeing shared memory with a signal handler

I have a homework question that asks me to get 2 integers from the user, put them in shared memory, fork a child, have the child add them and put the result in shared memory, and then the child will ...
2
votes
1answer
1k views

Python script that launches a process that it needs to clean up after and kill on receiving SIGTERM/SIGINT

I'm using a Python script to run a particular program that occasionally may need to be terminated (by receiving a SIGINT or SIGTERM) in which case a clean up process needs to be invoked (before ...
8
votes
1answer
2k views

Questions regarding the use of Requests Futures for accessing REST URLs

This is a much simplified version of the real code focusing just on the handling of Futures from Requests Futures. I have a few questions: I had to implement my own version of ...
4
votes
1answer
2k views

Handling SIGINT signal for a server program

I have created a small server program that encrypts text using a named pipe: ...