complaint from svlogd

David Collier from_busybox_maillist at dexdyne.com
Wed Feb 16 14:48:00 UTC 2011


I'm so sorry - this was my booboo.

For historical reasons to do with interrupting long sleeps, I was
terminating the command with SIGKILL, not realising that it is only the
issuing of an EOF ( which doesn't happen with SIGKILL ) that gets svlogd
to close down.

I assume it would be "conceptually difficult and wrong" to issue an EOF
on stdout when a process is killed by SIGKILL ?

D


In article <AANLkTi=sU9Y-sL8ciV3i5z4x4nEBeeOXwAQUVABhtnBL at mail.gmail.com>,
vda.linux at googlemail.com (Denys Vlasenko) wrote:

> *From:* Denys Vlasenko <vda.linux at googlemail.com>
> *To:* from_busybox_maillist at dexdyne.com
> *CC:* busybox at busybox.net
> *Date:* Tue, 15 Feb 2011 18:23:24 +0100
> 
> On Tue, Feb 15, 2011 at 4:13 PM, David Collier
> <from_busybox_maillist at dexdyne.com> wrote:
> > if I run
> >
> >   ( process | svlogd <directory> ) &
> >
> >   and then I kill the "process"
> >
> > I was sort of expecting the svlogd to notice and shut down 
> > politely.
> >
> > It doesn't seem to, just sit's there purposeless but happy!
> 
> I don't see it.
> 
> $ ( sleep 999 | strace -o/tmp/LOG svlogd /tmp ) &
> $ ps -A -o pid,args | grep 999
>   810 sleep 999
> $ kill 810
> $ cat /tmp/LOG
> execve("/bin/svlogd", ["svlogd", "/tmp"], [/* 47 vars */]) = 0
> ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0xff894670) = -1 EINVAL
> (Invalid argument)
> ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
> -echo ...}) = 0
> getuid32()                              = 0
> brk(0)                                  = 0x9585000
> brk(0x9586000)                          = 0x9586000
> open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 3
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> fcntl64(0, F_GETFL)                     = 0 (flags O_RDONLY)
> rt_sigprocmask(SIG_BLOCK, [HUP ALRM TERM CHLD], NULL, 8) = 0
> rt_sigaction(SIGTERM, {0x80826d5, [], SA_RESTORER, 0x80487fb}, 
> NULL, 8) = 0
> rt_sigaction(SIGCHLD, {0x8083dc8, [], SA_RESTORER, 0x80487fb}, 
> NULL, 8) = 0
> rt_sigaction(SIGALRM, {0x80826b1, [], SA_RESTORER, 0x80487fb}, 
> NULL, 8) = 0
> rt_sigaction(SIGHUP, {0x808268d, [], SA_RESTORER, 0x80487fb}, NULL, 
> 8) = 0
> clock_gettime(CLOCK_MONOTONIC, {26570, 266697215}) = 0
> open("/tmp", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 4
> fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
> fchdir(4)                               = 0
> open("lock", O_WRONLY|O_CREAT|O_APPEND|O_NONBLOCK|O_LARGEFILE, 
> 0600) = 5
> flock(5, LOCK_EX|LOCK_NB)               = 0
> fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
> open("config", O_RDONLY|O_LARGEFILE)    = -1 ENOENT (No such file 
> or directory)
> stat64("current", {st_mode=S_IFREG|0744, st_size=0, ...}) = 0
> open("current", O_WRONLY|O_CREAT|O_APPEND|O_NONBLOCK|O_LARGEFILE, 
> 0600) = 6
> fcntl(6, F_GETFL)                       = 0x8c01 (flags
> O_WRONLY|O_APPEND|O_NONBLOCK|O_LARGEFILE)
> ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0xff894464) = -1 ENOTTY
> (Inappropriate ioctl for device)
> fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
> fchmod(6, 0644)                         = 0
> fchdir(3)                               = 0
> clock_gettime(CLOCK_MONOTONIC, {26570, 271500133}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [HUP ALRM TERM CHLD], NULL, 8) = 0
> poll([{fd=0, events=POLLIN}], 1, 2745000) = 1 ([{fd=0, 
> revents=POLLHUP}])
>    ^^^^^^^^^^^^  kill 810 was done while svlogd was here ^^^
> rt_sigprocmask(SIG_BLOCK, [HUP ALRM TERM CHLD], NULL, 8) = 0
> fcntl64(0, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
> read(0, "", 1000)                       = 0
> fcntl64(0, F_SETFL, O_RDONLY)           = 0
> close(4)                                = 0
> fsync(6)                                = 0
> fchmod(6, 0744)                         = 0
> close(6)                                = 0
> close(5)                                = 0
> _exit(0)                                = ?
> 
> -- 
> vda
> 


More information about the busybox mailing list