If you don't set an error log, mongoose uses stderr by default. When you
call mg_stop() ctx->error_log will always be set so fclose will be called
on stderr.
That was conflicting with our application. I think mongoose should not
close stderr but leave it untouched in case the main application is using
it.
The proposed change is:
mongoose.c:3893
/* Close log files */
if (ctx->access_log && ctx->access_log != stderr )
(void) fclose(ctx->access_log);
if (ctx->error_log && ctx->error_log != stderr )
(void) fclose(ctx->error_log);
As an alternative stderr could not be the default and mongoose will not
log any errors unless the user sets a log.
Original issue reported on code.google.com by pedro.na...@gmail.com on 6 Jan 2010 at 3:02
Original issue reported on code.google.com by
pedro.na...@gmail.com
on 6 Jan 2010 at 3:02