Re: Apache::SIG kills the process

2001-01-28 Thread Stas Bekman

On Fri, 26 Jan 2001, Doug MacEachern wrote:

 On Tue, 9 Jan 2001, Stas Bekman wrote:
 
  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
 
 why are you using Apache::SIG at all?  its no longer required as of
 1.3.6-ish.  if the client goes away writes are noops,  you can test
 $r-connection-aborted if you want to know the client has gone away.

I know that :)

But it still might be useful for:

1. Those who have a huge code base and want an external solution instead
going to fish in the code and place the checking code.

2. Those who need mod_cgi back compatibility (and there are many who needs
that) (of course they can use if $ENV{MOD_PERL} but still they have to
find all the right place to plug the checking.

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Apache::SIG kills the process

2001-01-26 Thread Doug MacEachern

On Tue, 9 Jan 2001, Stas Bekman wrote:

 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

why are you using Apache::SIG at all?  its no longer required as of
1.3.6-ish.  if the client goes away writes are noops,  you can test
$r-connection-aborted if you want to know the client has gone away.




Apache::SIG kills the process

2001-01-09 Thread Stas Bekman

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|0x400}, {SIG_IGN},
8) = 0alarm(0)= 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGALRM, {0x8098168, [], SA_RESTART|0x400}, {0x8098168,
[], SA_INTERRUPT|0x400}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {0x80994f8, [], SA_INTERRUPT|0x400},
8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN}, {0x8099524, [], SA_INTERRUPT|0x400},
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:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/