Interrupt signal Control C takes too long to terminate a process


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Interrupt signal Control C takes too long to terminate a process
# 1  
Old 10-12-2005
Interrupt signal Control C takes too long to terminate a process

I have a process to terminate, and when keying Control C/ kill -int [processid], it takes 15 minutes to half an hour to terminate the process. I've tried using kill -2, or keying control c twice, however the process seem
to be killed abruptly, without writing into the log file.
So the only way in order to be sure that the process is terminated
safely, is by using control c once or typing kill -int. However I have to
wait so long, for the process to be terminated.

However on another server, the same process is terminated immediately,
using the Control C only once.


Is there a way how the Control C will terminate the process immediately?

Thanks.
# 2  
Old 10-12-2005
A process can catch SIGINT and shut itself down gracefully and it sounds like this process is doing that. If the graceful shutdown takes too long talk to the author of the program. A graceful shutdown can take various amounts of time depending on what the program was doing. You need to get a precise picture of exactly what the program is doing to shut itself down. You then may have some options to provide additional resources to the program. Or you can always just try a much faster computer. Right now your only options are the graceful shutdown and the abrupt shutdown.
# 3  
Old 10-12-2005
Running the process on a faster computer have got worse.

Because when running on a slower computer, the control C have terminated
the process immediatly. However on a faster computer, the control
C took very long to terminate.

Thanks,
Pauline.
# 4  
Old 10-12-2005
Decent programs usually call atexit() to clean up everything and close files, shutdown threads gracefully, etc.

This really sounds more like something the code itself is doing, rather than what the OS or the speed of the computer is doing.
# 5  
Old 10-12-2005
can you tell us more about the program you are running ?
is it a "traditional" program like bash or ls ?
# 6  
Old 10-12-2005
[This program does a lot of inserts into various tables.]

I have no source code of the program and couldn't contact the
author. The only way that I can run this program is through the Unix terminal.
It used to run very fine on the older server. On the older server, the program used to terminate immediately on submitting Control C.

However, on buying another faster server, the program isn't terminating immediately when submitting Control C.

Is it a problem with the configuration of the new server?!

Thanks.
# 7  
Old 10-12-2005
what are the OS of the two computers ?
maybe the program uses some non-portable tricks which slow down the program on the others platforms ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script takes too long to complete

Hi, I have a lengthy script which i have trimmed down for a test case as below. more run.sh #!/bin/bash paths="allpath.txt" while IFS= read -r loc do echo "Working on $loc" startdir=$loc find "$startdir" -type f \( ! -name "*.log*" ! -name "*.class*" \) -print | while read file do... (8 Replies)
Discussion started by: mohtashims
8 Replies

2. Shell Programming and Scripting

Find command takes long

Hi, I am trying to search for a Directory called "mont" under a directory path "/opt/app/var/dumps" Although "mont" is in the very parent directory called "dumps" i.e "/opt/app/var/dumps/mont" and it can never be inside any Sub-Directory of "dumps"; my below find command which also checks... (5 Replies)
Discussion started by: mohtashims
5 Replies

3. UNIX and Linux Applications

database takes long time to process

Hi, we currently having a issue where when we send jobs to the server for the application lawson, it is taking a very long time to complete. here are the last few lines of the database log. 2012-09-18-10.35.55.707279-240 E244403536A576 LEVEL: Warning PID : 950492 ... (1 Reply)
Discussion started by: techy1
1 Replies

4. Shell Programming and Scripting

ksh interrupt read instruction with signal

Dear shell experts, I spent last few days porting ksh script from ksh88/SunOS to ksh93/Linux. Basically, things are going well and I do not have too much troubles porting ks88 script to ksh93, but I stuck on one item. It's about sending and handling the signal. I found two similar... (8 Replies)
Discussion started by: bzk
8 Replies

5. Shell Programming and Scripting

sort takes a long time

Dear experts I have a 200MG text file in this format: text \tab number I try to sort using options -fd and it takes very long! is that normal or I can speed it up in some ways? I dont want to split the file since this one is already splitted. I use this command: sort -fd file >... (12 Replies)
Discussion started by: voolek
12 Replies

6. UNIX for Dummies Questions & Answers

Changing Password process takes a long time

We are running unix. After a reboot of the server we have found that changing password takes a long time. if type in passwd "username" you can type in the 1st instance of the password , press enter , then it will wait for about 3 minutes before bringing up the confirm password line typing it in... (4 Replies)
Discussion started by: AIXlewis
4 Replies

7. SuSE

Disabling interrupt function of Control-C key combination

I am using informix RDBMS over SUSE LINUX. In linux if you press control-c it acts as an interrupt key. In my program I have used control-c to perform certain functions but it is being overriden by interrupt function of control-c key combination of SUSE LINUX. Kindly suggest me a solution by which... (1 Reply)
Discussion started by: V.V.KUMAR
1 Replies

8. Shell Programming and Scripting

Killing a process that takes too long

Hello, I have a C program that takes anywhere from 5 to 100 arguments and I'd like to run it from a script that makes sure it doesnt take too long to execute. If the C program takes more than 5 seconds to execute, i would like the shell script to kill it and return a short message to the user. ... (3 Replies)
Discussion started by: WeezelDs
3 Replies

9. Shell Programming and Scripting

Terminate process

We have a system user "oracle_usr" always run some process in the system , but sometimes , these processes will not stop automatically until we terminate the process , can suggest the method how to terminate the process that is run by "oracle_usr" and run over 10 minutes ? thx (5 Replies)
Discussion started by: ust
5 Replies

10. Shell Programming and Scripting

terminate process

I want to have a script to terminate the system process that generated by user oracle_usr and have already processed for over 10 minutes , could suggest the script ? thx (1 Reply)
Discussion started by: ust
1 Replies
Login or Register to Ask a Question