You are not logged in.

#1 2010-06-23 11:35:04

AugustePop
Member
Registered: 2010-04-27
Posts: 95

when will pkill return?

if i issue

pkill -SIGTERM -x firefox

from a console, when will pkill return?

will it return immediately after sending the signals or will it be blocked till all the processes end?

i am using SIGTERM here so that the matched processes will be able to catch the signal and shut down properly, which unfortunately would take time.

Offline

#2 2010-06-23 12:37:18

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: when will pkill return?

Offhand, I suspect it will return immediately after sending the signal.  But why not just run it and find out?

Offline

#3 2010-06-23 13:46:06

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: when will pkill return?

It returns as soon as the signal is sent.

Also, SIGTERM is the default - you don't need to specify it.

Offline

#4 2010-06-23 15:22:41

AugustePop
Member
Registered: 2010-04-27
Posts: 95

Re: when will pkill return?

thank you for the quick response.

actually, after posting the question, i found out the answer by pure logic. since pkill can send any kind of signal to the process, it should return right after sending the signals.

i don't know that SIGTERM is the default signal since it is not documented in the man page. thank you for the tip.

Offline

#5 2010-06-23 15:51:01

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: when will pkill return?

At the end of the Description section of the man page is, "pkill will send the specified signal (by default SIGTERM) to each process."


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB