Questions tagged [sigint]

On POSIX-compliant platforms, SIGINT is the signal sent to a process by its controlling terminal when a user wishes to interrupt the process.

On POSIX-compliant platforms, SIGINT is the signal sent to a process by its controlling terminal when a user wishes to interrupt the process.

Wikipedia: https://en.wikipedia.org/wiki/SIGINT_%28POSIX%29#SIGINT

369 questions
0
votes
1 answer

How can I simulate a process running?

So I want to create a process and keep it running for a certain amount of time, before calling SIGINT on it and killing it. So what I have done is created a struct pcb (process control block), and when I have this process running i set…
Steven Hsu
  • 183
  • 1
  • 3
  • 15
0
votes
2 answers

using signal in c and resuming from specific point in program

I'm writing a program where I need to catch SIGINT signal so that I can kill child processes without the parent process exiting. I can kill child processes by sending them SIGKILL. But after a signal is handled the main program resumes from where it…
0
votes
2 answers

How to SIGINT multiple background programs via bash script after a long time?

I'm trying to write a simple bash script. First, I wrote another bash script where I run 5 copies of two different programs: #!/bin/bash ./fibonacci1 & ./fibonacci2 & ./fibonacci3 & ./fibonacci4 & ./fibonacci5 & ./factorization1 & ./factorization2…
arikan
  • 893
  • 9
  • 18
0
votes
3 answers

subprocess.Popen does not receive SIGINT/SIGKILL

From a Python script I would like to open vlc in a new thread and allow the user to close it cleanly (still from this script). It appears that the send_signal() instruction does not actually close vlc, what am I doing wrong? import subprocess import…
myoan
  • 401
  • 5
  • 14
0
votes
3 answers

How function signal() works in C with SIGINT

#include #include void f( int ); int main () { int i ; signal ( SIGINT , f) ; for (i =0; i <5; i ++) { printf ( " hello \n " ) ; sleep (10) ; } } void f( int signum ){ //signal ( SIGINT ,…
seinta
  • 115
  • 1
  • 6
0
votes
1 answer

is SIGINT semi blocking possible?

Im trying to handle SIGINT. Main purpose of SIGINT in my program cancelling current search function and printing the currently avaliable results. But whenever I try to catch a SIGINT signal it just closes my program. (I ve searched so much ,please…
Yakup Türkan
  • 576
  • 2
  • 6
  • 21
0
votes
1 answer

How to stop embedded R process in rpy2 using python/ipython

I am using rpy2 to execute R from ipython. However I want to kill or stop the embedded R process but Ctrl-C is not working. This is maybe because ipython intercepts SIGINT (I am not sure).. I tested with SIGSTOP (Ctrl+Z) and it works.. Any method to…
gc5
  • 9,468
  • 24
  • 90
  • 151
0
votes
2 answers

SIGINT signal re-install in linux

I am writing a program dealing with Linux signals. To be more specific, I want to re-install signal SIGINT in child process, only to find that it doesn't work. Here is a simpler version of my code: void handler(int sig){ //do something …
Shuai Zhang
  • 2,011
  • 3
  • 22
  • 23
0
votes
2 answers

About SIGINT in child processes

I am writing a shell, now it comes to control the child process. When I use signal (SIGTERM, SIG_DFL); in the child process, the signal SIGINT is generated by Ctrl + C, and that signal terminates whole the OS shell. how can I just terminate the…
C learner
  • 53
  • 2
  • 9
0
votes
3 answers

How to use "ctrl c" to kill all process?

I have an exe file compiled from C++ code. And I use bash to set up Linux environment and to call this .exe programme. Now coming to the problem, most of the time, users would like to use ctrlc to kill the processes when they finish using the…
thundium
  • 995
  • 4
  • 12
  • 30
0
votes
1 answer

control+c signal in qemu

Can anyone please help me to understand how qemu handle control+c signal? And in which file? (or some useful links to understand it) I want to make route (like call graph). Actually this signal is not working on my mips guest (but working on malta…
marry
  • 307
  • 2
  • 7
  • 20
0
votes
1 answer

A program to fork off children/grandchild

I have an assignment to write a program to use fork off a children. That child will the fork off its own child (grandchild of the original parent). The grandchild should exec() to do a ps -ef (for example). The child should wait for its child…
Kohn J.
  • 25
  • 2
  • 6
0
votes
1 answer

Java signal handling and then return to main program

MI have a program that starts with for loop and it spins for 10 times, and one loop lasts one second. I need to handle a signal (CTRL+C) and while handling it, it should do it's own for loop, and after it stops, then I should return to the main…
dmacan23
  • 765
  • 1
  • 9
  • 17
0
votes
1 answer

setpgrp/setpgid fails (?), works on Mac OSX, not on Linux

I'm trying to write a program that executes a child command, and does not allow that child to be killed by Ctrl+C. I've read that I can accomplish this with setpgid/setpgrp. The following code works on OSX, but on Linux (2.6.32, Ubuntu 10.04)…
OregonTrail
  • 8,594
  • 7
  • 43
  • 58
0
votes
2 answers

Default SIGINT in Node.js?

I tried searching the Node.js source code, but I could not find it. By default, where would I find the Node.js code that handles SIGINT (Ctrl+C) by default in the following example: var http = require('http'); var server =…
dgo.a
  • 2,634
  • 23
  • 35
1 2 3
24
25