* SAK killing daemons
@ 2001-08-15 8:25 VDA
2001-08-15 8:44 ` Petr Baudis
2001-08-15 11:47 ` VDA
0 siblings, 2 replies; 3+ messages in thread
From: VDA @ 2001-08-15 8:25 UTC (permalink / raw)
To: linux-kernel
I noticed that when I press SAK on virtual console #1
on my Linux box, some daemons die horribly (SIGKILLed)
and some are unaffected. This does not happen on other consoles.
I suppose dying daemons did not detach fully from controlling tty. And
since they were launched from virtual console #1 upon system startup,
SAK killed them.
Daemons dying upon SAK: syslogd mysqld top* logger*
Daemons surviving SAK: klogd gpm dhcpcd inetd automount
* these are not daemons, but I intend them to run continuously.
logger directs mysqld output to syslog, and I keep top on console #10:
su user0 -c "top s </dev/tty10 >/dev/tty10 &"
Also I see '?' in TTY column in 'ps -AH e' output for all these
daemons (both dying and surviving), so ps does not provide any hint...
Does anybody knows a way to write a helper script to detach
misbehaving daemons (or any normal process like top) from tty on startup?
BTW, do syslogd needs fixing to be immune to SAK like klogd?
Please CC me. I'm not on the list.
--
Best regards,
VDA mailto:VDA@port.imtp.ilyichevsk.odessa.ua
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SAK killing daemons
2001-08-15 8:25 SAK killing daemons VDA
@ 2001-08-15 8:44 ` Petr Baudis
2001-08-15 11:47 ` VDA
1 sibling, 0 replies; 3+ messages in thread
From: Petr Baudis @ 2001-08-15 8:44 UTC (permalink / raw)
To: VDA; +Cc: linux-kernel
> I noticed that when I press SAK on virtual console #1
> on my Linux box, some daemons die horribly (SIGKILLed)
> and some are unaffected. This does not happen on other consoles.
>
> I suppose dying daemons did not detach fully from controlling tty. And
> since they were launched from virtual console #1 upon system startup,
> SAK killed them.
>
> Daemons dying upon SAK: syslogd mysqld top* logger*
> Daemons surviving SAK: klogd gpm dhcpcd inetd automount
>
> * these are not daemons, but I intend them to run continuously.
> logger directs mysqld output to syslog, and I keep top on console #10:
> su user0 -c "top s </dev/tty10 >/dev/tty10 &"
>
> Also I see '?' in TTY column in 'ps -AH e' output for all these
> daemons (both dying and surviving), so ps does not provide any hint...
>
> Does anybody knows a way to write a helper script to detach
> misbehaving daemons (or any normal process like top) from tty on startup?
> BTW, do syslogd needs fixing to be immune to SAK like klogd?
>
> Please CC me. I'm not on the list.
Try running the dying daemons by setsid utility (man 1 setsid, man 2 setsid),
it can help maybe. And try to modify that su -c command to:
su user0 -c "top s" </dev/tty/10 >/dev/tty10 2>/dev/tty10 &
that could help also.
--
Petr "Pasky" Baudis
. .
#define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255)
#define BX_(x) ((x) - (((x)>>1)&0x77777777) \
- (((x)>>2)&0x33333333) \
- (((x)>>3)&0x11111111))
-- really weird C code to count the number of bits in a word
. .
My public PGP key is on: http://pasky.ji.cz/~pasky/pubkey.txt
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s++:++ a--- C+++ UL++++$ P+ L+++ E--- W+ N !o K- w-- !O M-
!V PS+ !PE Y+ PGP+>++ t+ 5 X(+) R++ tv- b+ DI(+) D+ G e-> h! r% y?
------END GEEK CODE BLOCK------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SAK killing daemons
2001-08-15 8:25 SAK killing daemons VDA
2001-08-15 8:44 ` Petr Baudis
@ 2001-08-15 11:47 ` VDA
1 sibling, 0 replies; 3+ messages in thread
From: VDA @ 2001-08-15 11:47 UTC (permalink / raw)
To: linux-kernel
Hello Petr,
Wednesday, August 15, 2001, 11:44:13 AM, you wrote:
>> I noticed that when I press SAK on virtual console #1
>> on my Linux box, some daemons die horribly (SIGKILLed)
>> and some are unaffected. This does not happen on other consoles.
>> I suppose dying daemons did not detach fully from controlling tty. And
>> since they were launched from virtual console #1 upon system startup,
>> SAK killed them.
>> Daemons dying upon SAK: syslogd mysqld top* logger*
>> Daemons surviving SAK: klogd gpm dhcpcd inetd automount
>
> Try running the dying daemons by setsid utility (man 1 setsid, man 2 setsid),
> it can help maybe. And try to modify that su -c command to:
>
> su user0 -c "top s" </dev/tty/10 >/dev/tty10 2>/dev/tty10 &
>
> that could help also.
Okay, tried that with top and it works. However, syslogd still
misbehaves. I tried these:
/usr/sbin/syslogd
setsid /usr/sbin/syslogd </dev/null >/dev/null 2>&1
setsid /usr/sbin/syslogd -n </dev/null >/dev/null 2>&1 &
with no success.
Does ANYBODY have syslogd which does NOT die after SAK on VT #1 ?
If so, please tell me how exactly do you launch it,
syslogd and kernel version. Mine:
syslogd: 1.4.1
kernel: 2.4.5
Note: klogd does not die. Looking at the sources, I don't see why.
They use similar method (however not identical code) of auto-backgrounding
but... maybe someone more experienced can take a look?
Please CC me, I'm not on the list.
--
Best regards,
VDA mailto:VDA@port.imtp.ilyichevsk.odessa.ua
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-08-15 11:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-15 8:25 SAK killing daemons VDA
2001-08-15 8:44 ` Petr Baudis
2001-08-15 11:47 ` VDA
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®