A signal is a message which can be sent to a running process. Signals can be initiated by programs, users, or administrators.

learn more… | top users | synonyms

2
votes
0answers
101 views

Busybox exits instantly printing 'SIGUSR1'

I was tinkering with my router these days. It runs on MIPS core and the OS is based on Linux. But the builtin busybox is very limited. I managed to export a binary of busybox compiled for MIPS through ...
3
votes
2answers
264 views

How are signals implemented in Linux?

When one process sends a signal to another process, does receiving process wait until it is rescheduled to run? So if every 1 ms we choose one process to run, does that mean the latency from ...
5
votes
1answer
264 views

SSH session pauses mid datastream; resumes with a keypress

I've had this problem occur at random, intermittently, across boxes at multiple companies, multiple distros, and multiple kernel revs. I think that I'm just cursed. What happens is that I'll have a ...
10
votes
3answers
4k views

Telnet send Ctrl-C

I use telnet to connect to a terminal server, which proxies the traffic to a RS-232 port. Unfortunately when using some of the devices it is not possible to send the ctrl-C character (0x03). Instead ...
7
votes
4answers
2k views

How to make `xargs` ignore child's exit and keep processing further

I sometimes run long xargs jobs overnight and it is really annoying to discover in the morning that xargs died somewhere in the middle, for example because of a segmentation fault in one single ...
7
votes
6answers
4k views

Terminating an infinite loop

I have a command that I want to have run again automatically each time it terminates, so I ran something like this: while [ 1 ]; do COMMAND; done; but if I can't stop the loop with Ctrl-c as that ...
1
vote
2answers
854 views

difference between signalfd and sigwaitinfo?

I went through examples and man page but couldn't figure out difference between signalfd and sigwaitinfo Apart from syntax both are doing same thing i.e. waiting for signal storing it details into ...
6
votes
2answers
2k views

Get ssh to forward signals

I want to be able to send signals (SIGINT is the most important) through ssh. This command: ssh server "sleep 1000;echo f" > foo will start sleep on server and after 1000 seconds it will put ...
5
votes
1answer
5k views

Why does SIGUSR1 cause process to be terminated?

I was surprised with this comment in other question: Sending dd the USR1 signal too soon after it has started (i.e. in a bash script, the line after you started it) will in fact terminate it Can ...
4
votes
1answer
2k views

Why is my C++ program killed by OS

I've compiled small C++ application for school project on my virtual ubuntu 11.04. However when I attempt to run it over some larger data set after ~20 sec the program is killed by OS. Killed ...
3
votes
3answers
776 views

Killing other user processes

There are certain user environments in which we have to login during certain performance testing and and kill all the process running in that environment. The environment names are like rswrk01, … up ...
3
votes
1answer
774 views

Issue with WINCH signal - what am I overlooking?

I am having an issue with the WINCH signal in the following code which is from a tutorial located at developerWorks®: #!/bin/bash trap 'get_window_size' WINCH # trap when a user ...
21
votes
2answers
510 views

When you try to terminate a process for good, which option for “kill” should you use?

I am getting a lot of mixed messages from people, and was wondering if it there really is not much of a difference in what you use. kill 'x' killall 'x' kill -9 'x' These are some options I've been ...
2
votes
1answer
234 views

Why doesn't an orphan process receive signals?

I have two shell scripts: launch_job.sh and sub_job.sh. If launch_job.sh uses the following method to run sub_job.sh: nohup sub_job.sh & sub_job.sh becomes an orphan, i.e. with PPID 1. I ...
1
vote
1answer
826 views

Crash and exit code 721035

Where can I find what this exit code means? I have process (A) that calls program (B) using clib system(). Sometimes program (B) returns with exit code 721035 and AIX kills process A. This is random ...
3
votes
2answers
3k views

How can I trap a program that returns 139 (segmentation fault) in bash?

I have a bash script that tests some programs and one of the program returns Segmentation fault so I tried to add a trap in the head of my script: trap "echo 'segfault occured!'" SIGSEGV That ...
3
votes
2answers
588 views

Wrapper program that sets signal handler

I would like to have a wrapper program that runs a given command and sets a signal handler so that it gets run when the command receives a specified signal. The question is this: Is there an ...
2
votes
1answer
614 views

What does “trace trap” mean when reported by zsh?

I am trying to run a set UID root program in UNIX using the zsh shell. But I keep getting this message $ ./progExe zsh: trace trap ./progExe Can anyone please tell what does “zsh: trace trap” mean? ...
9
votes
5answers
2k views

How to soft kill gui applications via terminal?

Is there a way to close a GUI application in friendly "please quit yourself now" way, without graphical access to the applications window? For example, if Gnome/X display crashes to black, I'd like ...
20
votes
2answers
1k views

why would typing Ctrl+c twice stop a running process in Linux?

There are Linux programs, for example vlc, that recommend typing ctrl+c twice to kill their execution from a terminal if the program didn't stop after the first one. Why would typing ctrl+c twice ...
4
votes
4answers
3k views

Ctrl+C does not work in gnome-terminal

On my Linux host, Ctrl+C does not seem to work and I do not know how to proceed to make it work. I am using Ubuntu 10.04 with bash 4.1.5(1), and working in Gnome-terminal. When I pressed Ctrl+C while ...
3
votes
1answer
3k views

What is signal 0 in a trap command?

I'm following this guide on how to set up passwordless SSH authentication with ssh-agent. To start up ssh-agent the author recommends the following code in .bash_profile: SSHAGENT=/usr/bin/ssh-agent ...
9
votes
2answers
1k views

Interruption of system calls when a signal is caught

From reading the man pages on the read() and write() calls it appears that these calls get interrupted by signals regardless of whether they have to block or not. In particular, assume a process ...
6
votes
2answers
7k views

How to signal the end of stdin input in bash

In Bash, I learned that the ending signal can be changed by here document. But by default how can I signal the end of stdin input? I happened to find that with cat and chardet, their stdin inputs can ...
7
votes
1answer
934 views

confirmed exit using trap

I am trying to trap the Ctrl+C signal asking a confirmation from the user. The trapping part works fine. But once the signal gets trapped, it does not return to the normal execution. Instead, it quits ...
6
votes
2answers
5k views

Program behavior when kill -HUP is recieved?

Is there a way to find out what will program do when it receives kill signal HUP? Without simply running the command ofc :D For example, killall -HUP pppd will restart pppd killall -HUP firefox ...
4
votes
2answers
699 views

Process descendants

I'm trying to build a process container. The container will trigger other programs. For example - a bash script that launches running background tasks with '&' usage. The important feature I'm ...
1
vote
1answer
2k views

Can you specify a separate trap in a subshell created with ()?

I'm writing a script that starts a subshell to go off and do some work. In a special case, the script needs to tell the subshell to cleanly stop what it's doing and exit early. However, my ...
2
votes
2answers
466 views

What's the difference between the ^S and ^Z control characters inside a terminal?

When using a terminal emulator, one can stop the currently running program with either CTRL-Z or CTRL-S. What's the difference between these signals?
1
vote
2answers
1k views

how to trap a suspend a resume from a bash script

I have a bash script (on osx) running continuously, it currently traps and handles a terminate like so trap onshutdown TERM how can I make trap also handle suspend/resume like trap onsuspend ? ...
13
votes
2answers
15k views

How can I kill a <defunct> process whose parent is init?

Transmission is intermittently hanging on my NAS. If I send SIGTERM, it doesn't disappear from the process list and a <defunct> label appears next to it. If I send a SIGKILL, it still doesn't ...
30
votes
5answers
4k views

Timing out in a shell script

I have a shell script that's reading from standard input. In rare circumstances, there will be no one ready to provide input, and the script must time out. In case of timeout, the script must execute ...
4
votes
3answers
4k views

when does the system send a SIGTERM to a process?

My server program received a SIGTERM and stopped (with exit code 0). I am surprised by this, as I am pretty sure that there was plenty of memory for it. Under what conditions does linux (busybox) send ...
9
votes
1answer
4k views

How to suspend and resume proccesses like bash does

this question is a follow-up to: How to suspend and resume proccesses I have started firefox from a bash session in gnome-terminal. The proccess tree looks like this: $ ps -e -o pid,ppid,cmd -H ...
4
votes
3answers
320 views

What documentation shows the associated numbers for linux signals like SIGTERM and SIGKILL?

I can look around the internet and find that the associated number for SIGKILL is 9, but is there linux documentation (such as, a man page) showing the complete list of signals and their numbers?
7
votes
2answers
2k views

What causes various signals to be sent?

I sometimes get a little confused by all of the signals that an application can receive. As I understand it, an application has a default handler for each of these signals, but it can provide its own ...
2
votes
2answers
398 views

Is nohup indefinite?

If I run a program with an infinite loop with nohup, will the program run indefinitely (until the machine is reset or until I manually terminate it)?