How to cancel nohup?
am 22.08.2005 10:43:25 von xiebopublic
Hello,
I mean I first "nohup myapplication &" and then want to cancel it and
let myapplication receive SIGHUP signal again.
Is it possible? If the answer is YES, how to do it?
Thank you for your time!
Best Regards,
Xie Bo
Re: How to cancel nohup?
am 22.08.2005 11:05:27 von Bill Marcum
On 22 Aug 2005 01:43:25 -0700, xie bo
wrote:
> Hello,
>
> I mean I first "nohup myapplication &" and then want to cancel it and
> let myapplication receive SIGHUP signal again.
> Is it possible? If the answer is YES, how to do it?
>
No, but you can kill it with TERM.
--
Knowledge, sir, should be free to all!
-- Harry Mudd, "I, Mudd", stardate 4513.3
Re: How to cancel nohup?
am 22.08.2005 11:41:38 von Frank Dietrich
Hi,
xie bo wrote:
> I mean I first "nohup myapplication &" and then want to cancel it and
> let myapplication receive SIGHUP signal again.
> Is it possible? If the answer is YES, how to do it?
"kill -s 9 $PID" should work.
Frank
Re: How to cancel nohup?
am 23.08.2005 00:44:29 von brian_hiles
Frank Dietrich wrote:
> xie bo wrote:
> > "nohup myapplication &" ...
> "kill -s 9 $PID" should work.
In general, I have a real problem with using "kill -9"
as a first-order attempt to kill any process. Using this
command can compromise the filesystem -- just do a web
search on "why you shouldn't use kill -9" ....
Even interactively, the usual best idiom is to use
kill -INT || kill -HUP || kill -KILL
Back in reference to the OQ:
man renice
Don't know 'bout Linux....
=Brian
Re: How to cancel nohup?
am 23.08.2005 09:37:52 von Stephane CHAZELAS
2005-08-22, 15:44(-07), bsh:
>
> Frank Dietrich wrote:
>> xie bo wrote:
>> > "nohup myapplication &" ...
>> "kill -s 9 $PID" should work.
>
> In general, I have a real problem with using "kill -9"
> as a first-order attempt to kill any process. Using this
> command can compromise the filesystem -- just do a web
> search on "why you shouldn't use kill -9" ....
It wouldn't compromise the integrity of the filesystem though,
maybe the data in the files, but not the filesystem, unless you
kill a mkfs or debugfs or restore or fsck maybe.
> Even interactively, the usual best idiom is to use
>
> kill -INT || kill -HUP || kill -KILL
if kill exits with a non-zero exit status for a signal, it will
for any other, it means there's no point in killing it: either
the process is already gone or you don't have the right to send
it a signal.
Rather something like:
kill -INT && {
sleep 1
kill -HUP
} && {
sleep 3
kill -KILL
}
--
Stéphane
Re: How to cancel nohup?
am 23.08.2005 13:04:29 von Frank Dietrich
Hi,
bsh wrote:
> Frank Dietrich wrote:
>> xie bo wrote:
>> > "nohup myapplication &" ...
>> "kill -s 9 $PID" should work.
>
> In general, I have a real problem with using "kill -9"
> as a first-order attempt to kill any process.
I understand xie's question like he can't kill it with INT.
> Even interactively, the usual best idiom is to use
>
> kill -INT || kill -HUP || kill -KILL
INT - only work if myapplication reacts on SIGINT
HUP - won't work because nohup ...
KILL - maybe the last possible way to cancel myapplication
What xie would use really depends on his myapplication.
regards
Frank
Re: How to cancel nohup?
am 23.08.2005 18:02:06 von Michael Zawrotny
Frank Dietrich wrote:
>
> bsh wrote:
>
> > Even interactively, the usual best idiom is to use
> >
> > kill -INT || kill -HUP || kill -KILL
>
> INT - only work if myapplication reacts on SIGINT
> HUP - won't work because nohup ...
> KILL - maybe the last possible way to cancel myapplication
I like to give "kill -TERM" a try before upgrading to KILL.
Mike
--
Michael Zawrotny
Institute of Molecular Biophysics
Florida State University | email: zawrotny@sb.fsu.edu
Tallahassee, FL 32306-4380 | phone: (850) 644-0069
Re: How to cancel nohup?
am 24.08.2005 15:36:50 von bonomi
In article ,
Michael Zawrotny wrote:
>Frank Dietrich wrote:
>>
>> bsh wrote:
>>
>> > Even interactively, the usual best idiom is to use
>> >
>> > kill -INT || kill -HUP || kill -KILL
>>
>> INT - only work if myapplication reacts on SIGINT
>> HUP - won't work because nohup ...
>> KILL - maybe the last possible way to cancel myapplication
>
>I like to give "kill -TERM" a try before upgrading to KILL.
In ascending order of 'imperativeness'
HUP
INT
QUIT
(ABRT if you want a core-dump)
TERM
KILL
Re: How to cancel nohup?
am 24.08.2005 17:29:18 von spcecdt
In article <11gotviln8i4t4c@corp.supernews.com>,
Robert Bonomi wrote:
>
>In ascending order of 'imperativeness'
> HUP
> INT
> QUIT
> (ABRT if you want a core-dump)
> TERM
> KILL
QUIT also gives a core dump.
John
--
John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/
Re: How to cancel nohup?
am 25.08.2005 00:58:15 von Bill Seivert
Frank Dietrich wrote:
> Hi,
>
> bsh wrote:
>
>>Frank Dietrich wrote:
>>
>>>xie bo wrote:
>>>
>>>>"nohup myapplication &" ...
>>>
>>>"kill -s 9 $PID" should work.
>>
>>In general, I have a real problem with using "kill -9"
>>as a first-order attempt to kill any process.
>
>
> I understand xie's question like he can't kill it with INT.
>
>
>>Even interactively, the usual best idiom is to use
>>
>>kill -INT || kill -HUP || kill -KILL
>
>
> INT - only work if myapplication reacts on SIGINT
> HUP - won't work because nohup ...
> KILL - maybe the last possible way to cancel myapplication
>
> What xie would use really depends on his myapplication.
>
> regards
> Frank
An option would be for the application to register for USR1
and use kill -USR1 to kill it.
Bill Seivert