Questions tagged [interruption]
126 questions
1077
votes
10 answers
How do I put an already-running process under nohup?
I have a process that is already running for a long time and don't want to end it.
How do I put it under nohup (that is, how do I cause it to continue running even if I close the terminal?)

flybywire
- 261,858
- 191
- 397
- 503
131
votes
8 answers
When does Java's Thread.sleep throw InterruptedException?
When does Java's Thread.sleep throw InterruptedException? Is it safe to ignore it? I am not doing any multithreading. I just want to wait for a few seconds before retrying some operation.

Manki
- 3,779
- 4
- 25
- 18
27
votes
3 answers
How can I kill a thread? without using stop();
Thread currentThread=Thread.currentThread();
public void run()
{
while(!shutdown)
{
try
{
…

greeshma
- 279
- 1
- 3
- 3
23
votes
6 answers
Does the finally block execute if the thread running the function is interrupted?
If I have a function with a try/finally section, and the thread running it is interrupted while in the try block, will the finally block execute before the interruption actually occurs?

user940016
- 2,878
- 7
- 35
- 56
16
votes
5 answers
Thread does not abort on application closing
I have an application which does some background task (network listening & reading) in a separate Thread. It seems however that the Thread is not being Terminated/Aborted when I close the application (click "x" button on titlebar).
Is that because…

migajek
- 8,524
- 15
- 77
- 116
12
votes
3 answers
AVAudioSession Interruptions
So in my app, running on iOS 6, everything seems to work fine with audio. I use the old C API format to catch interruptions using a callback; setting up via: AudioSessionInitialize(NULL, NULL, interruptionListenerCallback, (__bridge void *)self)…

Doc
- 1,480
- 2
- 16
- 28
11
votes
1 answer
Handling UserInterrupt exception in Haskell
I'm implementing a REPL for a Scheme interpreter in Haskell and I'd like to handle some async events like UserInterrupt, StackOverflow, HeapOverflow, etc... Basically, I'd like to stop the current computation when UserInterrupt occurs and print a…

Rafael Barreto
- 111
- 4
9
votes
3 answers
How to resume audio after interruption in Swift?
I am following instructions here, I've put together this test project to handle interruptions to audio play. Specifically, I'm using the alarm from the default iphone clock app as interruption. It appears that the interruption handler is getting…

rockhammer
- 957
- 2
- 13
- 38
9
votes
3 answers
What is the difference between wait/notify and wait/interrupt?
synchronized (Foo.class) {
while (someCondition) {
try {
Foo.class.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
It seems that this thread both wakes when…

Hải Phong
- 5,094
- 6
- 31
- 49
9
votes
3 answers
setting serial port interruption in linux
I am trying to set the interruption for a serial port in ubuntu (in program written in C), but it does not work. I have checked that the serial communication works correctly without the interruption, so I may be setting something wrong.
The code is…

gus
- 355
- 2
- 5
- 19
8
votes
6 answers
AudioSessionSetActive fails after interruption
I was trying to figure out what actually happens for weeks and I have no idea why I cannot continue playback after interruption, so probably you guys know an answer. AudioSessionSetActive(TRUE) always returns '!cat' which is…

pronebird
- 12,068
- 5
- 54
- 82
8
votes
0 answers
ObjectAL automatic interruption handling error
I've been playing with phone calls while (SpriteKit)game running in order to test interruptions. I am using example from ObjectAL documentation called : "Using the OpenAL Objects and OALAudioTrack".
So, I let the library to handle this…

Whirlwind
- 14,286
- 11
- 68
- 157
7
votes
3 answers
interrupting lua interpretation without ctrl -c quitting
I am running code from the book programming in Lua... http://www.lua.org/pil/3.6.html
when I run this code in the terminal interpreter... it continues reading input forever...
list = nil
for line in io.lines() do
list = {next=list,…

Punkroku
- 73
- 7
6
votes
4 answers
Interrupting looped threads in Java
I'm trying to understand how threads work in Java and currently investigating how to implement looped threads that can be cancelled. Here's the code:
public static void main(String[] args) throws Exception {
Thread t = new Thread() {
…

Andrey Agibalov
- 7,624
- 8
- 66
- 111
5
votes
1 answer
AudioKit handling of AVAudioSessionInterruption
After receiving a phone call or just having the phone ring our background play enabled AudioKit app goes silent for good and I am not sure how to handle that. The only way to restart sound output is to kill and restart the app. Other interruptions…

caxix
- 1,085
- 1
- 13
- 25