Questions tagged [termination]

is used in its general meaning, but it is bounded by the programming scope.

351 questions
0
votes
4 answers

Different increment on a for loop depending on a boolean

How can i select the increment on a for loop depending on a boolean,i am trying to do something like this: for (int y = iniY; isdown? (y >= endY): (y <= iniY+dy) ; isdown? --y:y++); the for loop accepts the termination but not the…
0
votes
0 answers

What iOS app delegate methods does the springboard kill trigger?

I found that when I double-tap home button to bring up the springboard, then hold and kill my app, applicationWillTerminate: is not triggered. This leaves me puzzled as to where I should place my termination procedures. I looked at this post: How to…
kakyo
  • 10,460
  • 14
  • 76
  • 140
0
votes
1 answer

Application terminated when tapping custom button on navigation bar

I made an custom button for a navigation bar, but when I tap it, it terminates -(void)viewDidLoad { UIImage *backButtonImage = [UIImage imageNamed:@"button.png"]; UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; …
user2616086
0
votes
3 answers

Must i abort this thread? Waiting for namedpipes. How do i do this properly?

I have another question about this same code and keeping the pipe open after the client closes it But here i have a problem gracefully terminating my app. My main code is below. There are 2 problems. 1) I am using Thread.Abort and 2) This…
user34537
0
votes
3 answers

How do you end an Application from a Web Method within a Web Service?

I'm trying to create a method within a web service that will terminate the application when called. The purpose of this is to end a game being played with a Windows form. Does anyone have any ideas?
Lou
  • 918
  • 3
  • 16
  • 29
0
votes
1 answer

How to protect access to Elastic Beanstalk resources + security advices?

I'm using Elastic Beanstalk as well as the new features for automatically creating some environment resources (like SQS queues). This is really convenient, however this suffer from one problem : if I "terminate" the environment, all the associated…
0
votes
2 answers

user define function call at the time of set_time_limit PHP

I want to run a file for a fix period of time. I can use set_time_limit function for this. But I want to call a function at the time of termination. This function is necessary to be called. Otherwise I will not be able to run this file again. Is…
0
votes
1 answer

How to instantly termainate an un-supervised script on demand?

I have a GUI which resembles an interpreter. It allows the user to write a script in Jython (implementation of Python in Java) and run it whenever he wants. Apart from that, I also wish to allow the user to instantly terminate the run whenever he…
Eyal Roth
  • 3,895
  • 6
  • 34
  • 45
0
votes
2 answers

Signals termination handler and cleanup actions

I have to manage the follows signals: SIGHUP, SIGINT, SIGQUIT, SIGTERM The code below is an example with SIGHUP: int sock_ds, acc_sock_ds; //TCP sockets void shutdown(int sig){ close(sock_ds); close(acc_sock_ds); raise(sig); } /*Sets…
Fabio Carello
  • 1,062
  • 3
  • 12
  • 30
0
votes
2 answers

How to tie thread lifetimes together safely, involving SQLite

Sorry about the title I can't really figure how to put the question into a title, if anybody can put that better please correct it! So anyway, in my program I have 2 threads, one is the main program and runs the GUI and everything to do with the…
J_mie6
  • 720
  • 1
  • 9
  • 25
0
votes
1 answer

Issuing a warning to users before an app is updated (possibly automatically)

Whilst preparing a new version of an app I have discovered that the previous version doesn't save the program state to permanent storage in all circumstances. So this information can be lost when an update is performed. Is there any way to warn…
0
votes
2 answers

How to close initialized connections when program is terminated by user

Im writing a daemon in C that posts data to PostgreSQL database using libpq library. It has structure like this: init(...) // init function, opens connection while(1){export(...)} // sends commands When someone kills the application, it leaves open…
Tomáš Šíma
  • 834
  • 7
  • 26
0
votes
2 answers

Python process dies on Ubuntu: what does the error code mean and is there a fix?

I am running multiple copies of the same python script on an Amazon EC2 Ubuntu instance. Each copy in turn launches the same child Python script using the solution proposed here From time to time some of these child processes die.…
I Z
  • 5,719
  • 19
  • 53
  • 100
0
votes
2 answers

launching python script process from another script on Ubuntu: how to track status?

I launch one Python script out of another one on an Amazon EC2 Ubuntu instance using a command: os.system(call) where call has the form "./script2.py arg1 arg2 arg3" I've noticed that from time to time script2.py somehow terminates prematurely. I…
I Z
  • 5,719
  • 19
  • 53
  • 100
0
votes
2 answers

How to stop program running infinite loop on close GUI (java)

I have a simple program for server/client communication using sockets. The server class contains run() method, this method has infinite loop to wait for socket acceptance. Any way, I wrote a code in the constructor to do termination for processing…
Saleh Feek
  • 2,048
  • 8
  • 34
  • 56