Questions tagged [signal]

Questions about signals, a kind of interprocess communication.

Signals are a kind of interprocess communication on Unix-like operating systems, including Ubuntu.

Some signals can be handled or ignored by the program that receives them, if it is designed to do so. Others invariably terminate the program.

The kill, killall, and pkill commands send signals. By default they send SIGTERM, which allows the program to clean up. Commands like kill -KILL, or the equivalent kill -9, send SIGKILL, which cannot be ignored.

When programs crash, they are terminated by a signal, usually SIGSEGV ("Segmentation fault") or SIGABRT. Pressing Ctrl+C in a terminal sends SIGINT. This terminates most noninteractive programs (and programs whose interaction is not in a terminal, such as servers and graphical applications). Most interactive programs, especially shells, cancel the current operation and return the user to the program's primary (i.e. outermost) prompt, when SIGINT is received.

The signals SIGUSR1 and SIGUSR2 are traditionally used to provide limited interactivity with otherwise noninteractive programs. Using kill -USR1 on a running dd process to query its status was once very common, since dd prints out this information when it receives SIGUSR1. But a status=progress argument passed to dd has risen in popularity since becoming available.

There are numerous other signals not summarized above.

Most Bourne-style shells, including bash, provide a feature to handle signals in a shell script (or interactive shell session). The trap command registers signal handlers.

The tag may be used for questions about how to use, send, and handle signals; problems that appear to involve signals in an important way; and situations where signals are used.

The term "signal" is also used with various other meanings. For example, there is a secure messaging application called Signal. There is also the concept of "signal strength" in wireless networking and software-defined radio. Exactly which other tags should be used instead for these things--as well as when , , or both should be used--does not appear fully established.

73 questions
9
votes
2 answers

Why does Ctrl + C not kill Python running in terminal?

I am trying to understand the reason why the whole Python process does not get killed when I press Ctrl + C inside and infinite loop or for that matter any Python function that I am running in terminal and only the loop/function is stopped?
5
votes
2 answers

What is the signal sent when the charger is unplugged/plugged

I would like to know which signal is sent to the kernel when I unplug my laptop. I need this information to make a program to switch my power mode automatically. I am currently on Ubuntu 23.10.
5
votes
2 answers

Detect that the workspace has changed

I can change my current workspace in various ways, e.g. by clicking on some switcher widget, with some key combination, with a command in a terminal. Is there a way to detect that the workspace has been changed, to launch a bash script at that…
Rodrigo
  • 153
5
votes
1 answer

Make gnome-terminal request user confirmation before close

When you open gnome-terminal without any options and execute a blocking command (e.g. python3, vim or cat) and then try to close the window by the close button (i.e. x button in the title bar) or some keyboard shortcut, a confirmation window is…
ynn
  • 353
  • 3
  • 10
5
votes
1 answer

How can I get yarn to use the right version of Node?

I am new to Node, JavaScript etc. and want to try messing with the code of Signal. For this I need a specific version of Node. I did this (on Ubuntu 16.04) using the following procedure: wget…
4
votes
3 answers

How can I tell how long for Watchdog to wait to stop all processes?

I have a server which is monitored by Watchdog, and experiences reboots occasionally due to faulty network hardware I am unable to replace at the moment. As I read, Watchdog sends a SIGTERM to all processes, requesting a safe shutdown, and after a…
nanofarad
  • 20,906
4
votes
2 answers

Input signal out of range; Change settings to 1600 x 900

I recently installed Ubuntu 12.04 onto my HP Pavilion, in an attempt to make the desktop able to dual-boot Windows 7 and Ubuntu. I managed to get down to the last step, and finished the installation process. After it prompted me to remove what I…
Clayton
  • 41
4
votes
1 answer

Ctrl-Z equivalent for GUI Programs?

I often have to run the update manager on a slow connection, and while reading my emails, I meanwhile would like to surf for 2 minutes in the web, then have the full bandwidth again for the update manager. From the command line, I can suspend a…
user unknown
  • 6,892
3
votes
1 answer

No SIGTERM before SIGKILL/shutdown with systemd on Ubuntu 16.04

I ran across this problem while I tried to answer a question on Stackoverflow. On shutdown, Ubuntu 12.04 sends SIGTERM to all processes and waits at most 10 seconds before killing them with SIGKILL (unless they terminated before). My answer on SO…
3
votes
1 answer

Bad WiFi reception on Asus Zenbook (Works great with Windows 7)

My WiFi reception on my Asus Zenbook (model ux31) is very weak compared to when I boot my Windows 7. I use both from the same location, and the reception on other devices (ex: my iPhone) is great. I'm now using Ubuntu 13.04, but this problem was…
3
votes
2 answers

The report belongs to a package that is not installed

I have gotten the error message "The report belongs to a package that is not installed." Generally I would just ignore that since seemingly there is no problem except I got a crash report and then I said to report the problem and then I get…
3
votes
1 answer

How to identify shutdown event in linux

In my Ubuntu application, I wanted to perform certain finalization for my application before the system is being shutdown. For that, I need to identify the shutdown event in my application. From what I have read online, there are mainly two major…
3
votes
1 answer

remove Signal in ubuntu when you forgot how you installed it

i don't remember how i installed Signal desktop. i think i did it with ubuntu software. the version is v1.39.6 so i removed it with all the ways i know as if installed w/snap but it says here that the package does not exit sudo snap remove…
2
votes
0 answers

Ubuntu 16.04LTS Four monitor display issue

I've been browsing the forum trying to find a solution to my specific problem but can't find anything specific. My graphics card is the Radeon R9 380 Sapphire Nitro. I have three DVI displays, one of these is using an active adapter to displayport.…
2
votes
1 answer

Disable "System program problem detected" for segfaults in my own programs

I don't mind being notified about system programs that SEGV -- I would actually like to report those cases, so this is not a duplicate of Getting “System program problem detected” pops up regularly after upgrade. However, I spend quite a lot of…
cat
  • 1,712
1
2 3 4 5