File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -538,15 +538,19 @@ static void service_rpc(char *service_name)
538
538
539
539
static NORETURN void die_webcgi (const char * err , va_list params )
540
540
{
541
- char buffer [ 1000 ] ;
541
+ static int dead ;
542
542
543
- http_status ( 500 , "Internal Server Error" );
544
- hdr_nocache () ;
545
- end_headers () ;
543
+ if (! dead ) {
544
+ char buffer [ 1000 ] ;
545
+ dead = 1 ;
546
546
547
- vsnprintf (buffer , sizeof (buffer ), err , params );
548
- fprintf (stderr , "fatal: %s\n" , buffer );
549
- exit (0 );
547
+ vsnprintf (buffer , sizeof (buffer ), err , params );
548
+ fprintf (stderr , "fatal: %s\n" , buffer );
549
+ http_status (500 , "Internal Server Error" );
550
+ hdr_nocache ();
551
+ end_headers ();
552
+ }
553
+ exit (0 ); /* we successfully reported a failure ;-) */
550
554
}
551
555
552
556
static char * getdir (void )
You can’t perform that action at this time.
0 commit comments