Reply to Re: CGI-BIN Forced Termination (Apache)

Your name:

Reply:


Posted by HansH on 11/24/06 08:07

"petersprc" <petersprc@gmail.com> schreef in bericht
news:1164341247.373881.17910@h54g2000cwb.googlegroups.com...
>> >As far as I know, in the event of a disconnect, Apache will send a
>> >SIGTERM to the child, and then, if needed, wait up to approximately 3
>> >seconds and send a SIGKILL. Your CGI could handle the SIGTERM and do
>> >any required cleanup. It could also leave behind a long-running process
>> >using the "at now" command.

Fragments refering to this sequence can be found in the source files of
various modules.
I am unsure whether those apply to handling lost connections or are just
propagating a SIG* to all forked children, CGI included. Chances are
mod_cgid behaves slightly different.

>> Is that promised anywhere? In my experience, the only side effect of the
>> disconnect is that the sockets feeding stdin and stdout get disconnected.
I have seen the same effects.

>I think a SIGPIPE starts it, and then mod_cgi will detect that it needs
> to follow with a kill.
Fragment of source code seem to contradict:
* Note that we already ignore SIGPIPE in the core server.

unix/posix notes:
- The proper setting for SIGPIPE is SIG_IGN, if user code changes it
for any of their own processing, it must be restored to SIG_IGN
prior to executing or returning to any apache code.

The latter may indicate behaviour depends on OS.

HansH

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация