08-15-2010
Off the top of my head, I'd say that tomcat is ignoring TERM (15) signals (the default when you only provide a PID to the kill command). This is why 'kill $PID' seems not to work. It is likely ignoring HUP (1) and QUIT (3) signals too.
Quote:
is there any other way to get rid of this.
I'm not really sure what
this is that you are wanting to get rid of. The running process, the script, the need for kill -9?
I'll go on the assumption that you are wanting to cause a core dump which is not produced when using -9 (SIGKILL). Try using 'kill -6' (abort) -- I'd hope that the tomcat developers left this signal set to it's default value (terminate programme and generate a core dump).
Last edited by agama; 08-15-2010 at 12:50 PM..
Reason: fixed typo
This User Gave Thanks to agama For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi all,
I am using top command in my script to redirect output to temp file. I used kill -9 `ps -ef|grep top|grep -v grep|awk '{print $2}'` to kill top command in my script, but it is not working? Can you please tell how to kill top command in my script? (4 Replies)
Discussion started by: johnl
4 Replies
2. Shell Programming and Scripting
Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies
3. Linux
I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies
4. Web Development
Hey!
Does anyone know how to create rewrite rules to change:
“link.html?hl=en” to “/en/link.html”
“link.html?hl=jp” to “/jp/link.html”
“link.html?hl=es” to “/es/link.html”
etc?
Where "link.html" changes based on the page request? (2 Replies)
Discussion started by: Neo
2 Replies
5. Solaris
I am running Solaris 9. I have a problem with kill command. I'm sort of teaching myself so this might be a really stupid thing. I logged in as a normal user, lets say ABC, and then did "su" to root. After becoming root, I tried to kill the process started by ABC by saying
kill -9 "pid of ABC"
... (3 Replies)
Discussion started by: the_red_dove
3 Replies
6. Shell Programming and Scripting
All,
I am trying to build a script in perl that will alllow me to pass the IP address to a ping command and redirect the output to a file and then kill that process after a certain period of time.
let's say, I call my script ping.pl, I would like to be able to run it like this for example :... (7 Replies)
Discussion started by: Pouchie1
7 Replies
7. Shell Programming and Scripting
Hi,
I am new to shell scripting and want to create a script with the follwoing description:
I want to restrict the users from giving a kill command on a unix server. The server have a restricted logins with login id and passwords. I want a script that will find out if a user has given a... (9 Replies)
Discussion started by: shell_scripting
9 Replies
8. Shell Programming and Scripting
( sleep 3
echo ${LOGIN}
sleep 2
echo ${PSWD}
sleep 2
while read line
do
echo "$line"
PID=$?
sleep 2
kill -9 $PID
done < temp
sleep 5
echo "exit" ) | telnet ${HOST}
while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies
9. UNIX for Advanced & Expert Users
I originally had a script written in pure shell that I used to parse logs in real time and create a pipe delimited file that only contained errors. It worked but it was using a lot of memory (still not clear on why). I originally got around this by writing a wrapper for the script that ran on cron... (1 Reply)
Discussion started by: DeCoTwc
1 Replies
abort(3C) abort(3C)
NAME
abort() - generate a software abort fault
SYNOPSIS
DESCRIPTION
first closes all open files, streams, directory streams, and message catalogue descriptors, if possible, then causes the signal to be sent
to the calling process. This may cause a core dump to be generated (see signal(2)).
If the signal is caught, the handling function is executed. If the handling function returns, the action for is then reset to and the sig-
nal is sent again to the process to ensure that it terminates.
RETURN VALUE
does not return.
ERRORS
No errors are defined.
APPLICATION USAGE
is not intended to be caught.
DIAGNOSTICS
If is neither caught nor ignored, and the current directory is writable, a core dump is produced and the message is written by the shell.
SEE ALSO
adb(1), exit(2), kill(2), signal(2), signal(5), thread_safety(5).
STANDARDS CONFORMANCE
abort(3C)