You are not logged in.

#1 2011-10-21 12:01:15

ying
Member
From: Austria
Registered: 2010-03-02
Posts: 110

Conky does not get killed!

If I start a terminal, run the command

conky

and then exit the terminal, then conky appears again after a few seconds?! How is this possible? All terminals do create a pseudo terminal, which should kill all processes, when it is closed!

wink

Last edited by ying (2011-10-21 12:14:59)

Offline

#2 2011-10-21 12:05:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Conky does not get killed!

I have several aliases that tell e.g. wget to try reconnect and keep downloading - 'wget -c' - and I can't kill it via ^C because it immediately reappears. I know nothing about conky, but check what exactly is being executed when you type 'conky':

[karol@black ~]$ type wget
wget is /usr/bin/wget
[karol@black ~]$ type w
w is aliased to `wget -c --limit-rate=200K'

Offline

#3 2011-10-21 12:17:47

ying
Member
From: Austria
Registered: 2010-03-02
Posts: 110

Re: Conky does not get killed!

Hmm but I only execute the conky binary. But the strange think is, how does conky breaks out of the pty(pseudo terminal)?

Offline

#4 2011-10-21 12:21:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Conky does not get killed!

Do you have a config file that is read & executed by the conky binary?
You can use e.g. htop to see what's being executed by what (use the tree view) - you can try to use htop to kill that stubborn conky too.

Offline

#5 2011-10-21 13:04:09

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,954
Website

Re: Conky does not get killed!

AFAIK conky immediately forks a new process upon the TERM singnal. Or even right at the beginning? Cant try now...


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#6 2011-10-21 13:19:27

ying
Member
From: Austria
Registered: 2010-03-02
Posts: 110

Re: Conky does not get killed!

Yeah but even if you fork a new process and call also setsid, it should be killed by closing the pty device!?

Offline

#7 2011-10-21 13:20:33

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,954
Website

Re: Conky does not get killed!

ying wrote:

Yeah but even if you fork a new process and call also setsid, it should be killed by closing the pty device!?

When called with nohup, then no.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#8 2011-10-21 13:29:28

ying
Member
From: Austria
Registered: 2010-03-02
Posts: 110

Re: Conky does not get killed!

Is there a way to reset the nohup signal for conky?

Offline

#9 2011-10-21 14:06:38

DerFlob
Member
From: Munich, Germany
Registered: 2011-09-18
Posts: 21

Re: Conky does not get killed!

Try adding the setting "background false" to your .conkyrc. This should prevent conky to fork to the background.

Offline

#10 2011-10-21 17:08:26

ying
Member
From: Austria
Registered: 2010-03-02
Posts: 110

Re: Conky does not get killed!

Hmm. No that is not what I want. I am running a complete Desktop Environment in a pseudo terminal. My goal is to kill all this running processes, when I close it. Is there a possibility to do that?

Offline

#11 2011-10-21 17:24:52

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,954
Website

Re: Conky does not get killed!

Conky will exit, as soon X is terminated.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#12 2011-10-21 17:29:19

ying
Member
From: Austria
Registered: 2010-03-02
Posts: 110

Re: Conky does not get killed!

Yes, but I am programming a login manager and my goal is to save time. So I don't want to restart X. All is functioning. Only this conky wink. I just have seen, that the output of ps -A tells me, that conky runs in a pty (ex.: pty/0). If I stop the pty, it changes to an '?'. So before I close the pseudo terminal, I could collect all processes, which do run in the pty and then kill them.

Edit: But there is a problem. How do I know, which new created ptys (New Terminals started in the DE) are belonging to the the main pseudo terminal process?
Edit2: Conky is ignoring the SIGHUP Signal, when the process session leader sends it out. But I could scan the pids and check their parent pids. That should work.

big_smile

Last edited by ying (2011-10-21 19:03:31)

Offline

Board footer

Powered by FluxBB