termination is used in its general meaning, but it is bounded by the programming scope.
Questions tagged [termination]
351 questions
7
votes
1 answer
How to distinguish between different causes of app termination in Cocoa?
I would like my application to ask for confirmation before quitting, except when it's being terminated by the system during shutdown or restart (because when OS X tries to apply security updates at midnight it gets stuck on the "Are you sure?"…

Kornel
- 97,764
- 37
- 219
- 309
7
votes
1 answer
Termination of python script while using ZeroMQ with dead server
I have a problem in closing python application while I using ZeroMQ.
first I connect to a server that is not running!
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket_id = randomID()
socket.setsockopt(zmq.IDENTITY,…

GTavasoli
- 448
- 4
- 11
7
votes
0 answers
Why is svchost.exe terminating my C# application?
For some reason, my C# application is being terminated by svchost.exe and I'm trying to understand why. It was terminating the application silently until I turned on Silent Process Exit logging using Gflags.exe from the Windows Debugging Tools. It…

Mike
- 185
- 1
- 1
- 7
6
votes
2 answers
PHP script doesn't exit on browser exit
Why this dummy script keeps running event if the client closes the browser (so the connection to the server)?
while ( true )
{
sleep( 1 );
file_put_contents( '/tmp/foo' , "I'm alive ".getmypid()."\n" , FILE_APPEND );
}
It's unexpected to…

cYrus
- 2,976
- 6
- 29
- 47
6
votes
4 answers
Defining recursive function over product type
I'm trying to formalize each integer as an equivalence class of pairs of natural numbers, where the first component is the positive part, and the second component is the negative part.
Definition integer : Type := prod nat nat.
I want to define a…

Mark
- 5,286
- 5
- 42
- 73
6
votes
3 answers
Abnormal Termination due to stack overflow
I recently wrote my Grad school Admission test few days back and the following question appeared in the test.
When the below function is invoked with any positive integer as argument, does it terminate? Also does it print anything?
void convert (int…

Beyond.Multiverse
- 73
- 8
6
votes
1 answer
Need to invoke ioctl(tty0_fd, KDSETMODE, KD_TEXT) upon abnormal termination
I am using the Linux framebuffer in my application, and setting ioctl(tty0_fd, KDSETMODE, KD_GRAPHICS) to prevent any cursor or text from being displayed by the underlying terminal, and then cleaning up upon normal program termination.
But remaining…

Josh Sanford
- 622
- 5
- 18
6
votes
3 answers
Haskell and laziness
I've just started to learn Haskell and I was told that Haskell is lazy, i.e. it does as little work as possible in evaluating expressions, but I don't think that's true.
Consider this:
und :: Bool -> Bool -> Bool
und False y = False
und y False =…

Kiuhnm
- 478
- 3
- 13
6
votes
4 answers
Better termination for s(X)-sum
(Let me sneak that in within the wave of midterm questions.)
A common definition for the sum of two natural numbers is nat_nat_sum/3:
nat_nat_sum(0, N, N).
nat_nat_sum(s(M), N, s(O)) :-
nat_nat_sum(M, N, O).
Strictly speaking, this definition is…

false
- 10,264
- 13
- 101
- 209
6
votes
2 answers
How can I add scala actors to an existing program without interfering with the normal termination behavior?
This program, after executing main(), does not exit.
object Main
{
def main(args: Array[String]) {
... // existing code
f()
... // existing code
}
def f() {
import scala.actors.Actor._
val a =…

Eldritch Conundrum
- 8,452
- 6
- 42
- 50
6
votes
2 answers
String with a semicolon results in "unterminated string meets end of file" in RubyMine
In the RubyMine debugger, just type this into the watches:
';'
or
";"
and I am getting the error:
"unterminated string meets end of file"
Why is this? It doesn't happen in the Rails console, and it doesn't have anything to do with RubyMine, as…

Marc Clifton
- 756
- 1
- 11
- 19
6
votes
2 answers
How to properly stop an xCode project currently running?
This may sound like a silly question, however with the iOS 6 viewDidUnload no longer getting called, I'm interested in how to properly terminate an iOS app currently being debugged with xCode on the development device. Is hitting the stop button…

Alex Stone
- 46,408
- 55
- 231
- 407
5
votes
1 answer
How to use UndecidableInstances locally?
Yes, I know that UndecidableInstances can be bad. I really tried hard to design my module so that it doesn't need it however I have something like this:
instance Foo x (C x y) => Bar (C x y) where
...
and changing it would make the API…

julx
- 8,694
- 6
- 47
- 86
5
votes
4 answers
Shutdown Hook c++
is there some way to run code on termination, no matter what kind termination (abnormal,normal,uncaught exception etc.)?
I know its actually possible in Java, but is it even possible in C++? Im assuming a windows environment.

Sebastian Hoffmann
- 11,127
- 7
- 49
- 77
5
votes
1 answer
How to implement list item deletion for all argument modes?
The following Prolog program defines a predicate deleted/3 for deleting all the occurrences of the item passed in first argument from the list passed in second argument and results in the list passed in third argument:
deleted(_, [], []).
deleted(X,…

Géry Ogam
- 6,336
- 4
- 38
- 67