Questions tagged [terminate]

For questions regarding the termination of processes, threads, and sessions.

937 questions
-1
votes
1 answer

How to know whether an app is being terminating in iOS?

- (void)applicationDidEnterBackground:(UIApplication *)application { //...function_a call } - (void)applicationWillEnterForeground:(UIApplication *)application { //...function_b call } -…
Hemang
  • 26,840
  • 19
  • 119
  • 186
-1
votes
1 answer

java threads are null when join() is called

For homework, I am writing a stop() method for a server that managers multiple threads that perform transactions. Stop() is supposed to 1. submit a stop command to a queue of commands and 2. call join() on all the threads so that transactions have a…
L Wang
  • 19
  • 5
-1
votes
1 answer

Why subprocess can't successfully kill the old running process?

I run a program test.py. Since it collapses frequently, I import subprocess to restart it when it stops. Sometimes I found subprocess can't successfully restart it. Hence, I force the program to restart every 60 minutes. But I find that there…
Deep_fox
  • 405
  • 2
  • 6
  • 14
-1
votes
1 answer

Android - Perfect solution for quitting or terminating an application programmatically?

If my app encounters a particular error, I want to end my app without any trace of it remaining in the system. I have already seen many threads on this topic, specially these two. Is quitting an application frowned upon? How to quit android…
keylime
  • 29
  • 4
-1
votes
1 answer

Terminate all child process in LInux

I am developing a sandbox on linux. And now i am confused terminating all process in the sandbox. My sandbox works as follows: At first only one process run in the sandbox. Then it can create several child process. And child process will create…
user2669704
  • 49
  • 2
  • 4
-1
votes
1 answer

Xcode NSRunningApplication Terminate

I have this code: NSWorkspace *sharedWorkspace = [NSWorkspace sharedWorkspace]; NSString *appPath = [sharedWorkspace fullPathForApplication:appName]; NSString *identifier = [[NSBundle bundleWithPath:appPath] bundleIdentifier]; NSArray *selectedApps…
lab12
  • 6,400
  • 21
  • 68
  • 106
-1
votes
1 answer

AWS seems to start another EC2 instance with same AMI automatically after termination

I have 6 ec2 instances and I want to terminate about 3 of them. I've tried terminating them from the command line using ec2-terminate-instances and also using the AWS mananagement console ( Right click on instance and click on terminate). The…
ppaul74
  • 751
  • 1
  • 13
  • 21
-1
votes
3 answers

Finish Main() from within sub class

I've got a Main() that gets executed as as Thread on a schedule. If an exception happens (e.printStackTrace), the threads aborts and waits until the next starts. I want to be able to abort the thread without throwing an exeption. Inside the…
-2
votes
2 answers

How can I store data when the app going to terminate in iOS?

We would like to track when the app is terminated by a user so we are using 'applicationWillTerminate' method. sometimes it's working fine but sometimes we can not store data because the app is terminated so is there any other way to track that. We…
-2
votes
1 answer

Terminate method execution from another in PHP

In the basic example below I'm expecting that the one() method terminates the two() method when the if statements returns true, but it always returns 'something'. How can I terminate the execution of method two() from method one()? Class MYclass { …
silvered.dragon
  • 407
  • 1
  • 7
  • 19
-2
votes
2 answers

How do I stop a thread in python which itself is being called inside a loop?

This seems like a particularly confusing question based on the other similar answers I found on SO. I have code similar to the following: def parentFunction(): # Other code while True: var1, var2 = anotherFunction1() # Getting client…
codingray
  • 106
  • 7
-2
votes
2 answers

In Windows, how can I termiante an application if I can't get the task manager to the foreground?

Basically the question is what is the Windows equivalent to Linux' changing tty, login in and killing processes from there? Situation: Once in a while I switch back to Windows to play games when there seems no reasonable way to get them running…
kaiya
  • 271
  • 1
  • 3
  • 16
-2
votes
2 answers

When does an infinite loop terminates if not intrupted manually?

The only computer I can access is one among all in my class, so I was not able to try this program while (1) printf ("I am Printing\n"); by myself for such long time. But I am very curious to know, when an infinite loop terminates if we let it…
Snigdh
  • 61
  • 11
-2
votes
1 answer

What is the best way to terminate a thread in python?

I am implementing a Flask application and I'm calling a function A, based on a request. Inside the function A, there is another function called B and it is called. But, I don't need to wait until the end of the execution of function B to return the…
-2
votes
1 answer

Terminating another user's session in PHP

When a user starts my app, I ask for the PHP session id string using session_id(). I store this session ID string in a MySQL table. The app can have dozens of people logged in at a time, and I need to be able to terminate a user through a program…
Andrew
  • 63
  • 1
  • 6