You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/01/09 11:00:22 UTC

Apache::SIG kills the process

I was rewriting the detecting 'STOP' button pressed section in the guide,
to notice that Apache::SIG kills the process under Apache::Registry.

httpd.conf:

  PerlFixupHandler Apache::SIG

test script:

  use strict;
  my $r = shift;
  $r->send_http_header('text/plain');

  print("PID = $$\n");
  $r->rflush;

  while(1){
    $r->print("\0");
    $r->rflush;
    sleep 1;
  }

'STOP' pressed:

alarm(300)                              = 0
alarm(0)                                = 300
write(3, "\0", 1)                       = 1
time([979032041])                       = 979032041
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})               = 0
time([979032042])                       = 979032042
alarm(300)                              = 0
alarm(0)                                = 300
write(3, "\0", 1)                       = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) ---
getppid()                               = 5957
write(3, "\0", 1)                       = -1 EPIPE (Broken pipe)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGPIPE (Broken pipe) ---
getppid()                               = 5957
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(4, [3], NULL, NULL, {0, 0})      = 1 (in [3], left {0, 0})
time(NULL)                              = 979032042
write(17, "127.0.0.1 - - [09/Jan/2001:10:20"..., 92) = 92
gettimeofday({979032042, 716786}, NULL) = 0
times({tms_utime=43, tms_stime=5, tms_cutime=0, tms_cstime=0}) = 14540116
close(3)                                = 0
rt_sigaction(SIGUSR1, {0x8099524, [], SA_INTERRUPT|0x4000000}, {SIG_IGN},
8) = 0alarm(0)                                = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGALRM, {0x8098168, [], SA_RESTART|0x4000000}, {0x8098168,
[], SA_INTERRUPT|0x4000000}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {0x80994f8, [], SA_INTERRUPT|0x4000000},
8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN}, {0x8099524, [], SA_INTERRUPT|0x4000000},
8) = 0rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No
such file or directory)
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
munmap(0x40014000, 4096)                = 0
_exit(0)                                = ?

CORE::exit is called internally and the process quits. The trace was
run under httpd -X, but the same happens with normal setup.

Apache/1.3.14 (Unix) mod_perl/1.24_02-dev perl5.6.0 linux (k2.2.17)

Ideas? Thanks!

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/