On Jan 21, 9:03 am, perl-l...@christophfriedrich.de wrote: > Hi there, > > I'm using the FCGI module (version 0.67) and a lighttpd > to create an imageserver. > > But currently I have the problem that if I > shutdown the lighttpd server, the perl processes are still there with an > open file descriptor to the socket. > > There are not a child process > anymore and are only killable. > > Here some code: > > #!/usr/bin/perl > > use > strict; > use warnings; > > use FCGI; > > my $handling_request = 0; > my > $exit_requested = 0; > > my $request = FCGI::Request(); > > sub sig_handler { > > $exit_requested = 1; > if ( !$handling_request ) { > $request->Flush(); > > $request->Finish(); > exit( 0 ); > } > > } > > $SIG{USR1} = > &sig_handler; > $SIG{TERM} = &sig_handler; > $SIG{PIPE} = 'IGNORE'; > > # Main > function > sub do_request { > $request->Flush(); > > $request->Finish(); > > } > > while ( $handling_request = ( $request->Accept()>= 0 ) ) { > > &do_request; > > $handling_request = 0; > last if > $exit_requested; > > } > > $request->Flush(); > $request->Finish(); > > exit( 0 > ); > > Here is the lighttpd config (only fastcgi section): > > fastcgi.server = ( "" => > (( > "max-procs" => 1, > "socket" => > "/tmp/img.promobil.de.fcgi.socket", > "bin-path" => > "/home/friedrich/public_html/promobil/trunk/imageserver/imageserver.pl", > > "check-local" => "disable", > "allow-x-send-file" => "enable", > )) > ) > > I > don't know why the perl processes hung there and do not exit... > > Here > also some output of lsof (from such a process): [ snip ]
Just a shot in the dark but what is the reason for ignoring SIGPIPE...? -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/