-const char jcc_rcs[] = "$Id: jcc.c,v 1.304 2009/11/27 13:46:47 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.306 2009/12/22 13:04:10 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
client_timeout = (unsigned)csp->server_connection.keep_alive_timeout - latency;
log_error(LOG_LEVEL_CONNECT,
- "Waiting for the next client request. "
+ "Waiting for the next client request on socket %d. "
"Keeping the server socket %d to %s open.",
- csp->server_connection.sfd, csp->server_connection.host);
-
+ csp->cfd, csp->server_connection.sfd, csp->server_connection.host);
if ((csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE)
&& data_is_available(csp->cfd, (int)client_timeout)
&& socket_is_still_usable(csp->cfd))
{
log_error(LOG_LEVEL_CONNECT, "Client request arrived in "
- "time or the client closed the connection.");
+ "time or the client closed the connection on socket %d.",
+ csp->cfd);
/*
* Get the csp in a mostly vergin state again.
* XXX: Should be done elsewhere.
else
{
log_error(LOG_LEVEL_CONNECT,
- "No additional client request received in time.");
+ "No additional client request received in time on socket %d.",
+ csp->cfd);
#ifdef FEATURE_CONNECTION_SHARING
if ((csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_SHARING)
&& (socket_is_still_usable(csp->server_connection.sfd)))
#if defined(unix)
{
pid_t pid = 0;
-#if 0
- int fd;
-#endif
if (!no_daemon)
{
exit( 0 );
}
/* child */
-#if 1
- /* Should be more portable, but not as well tested */
+
setsid();
-#else /* !1 */
-#ifdef __FreeBSD__
- setpgrp(0,0);
-#else /* ndef __FreeBSD__ */
- setpgrp();
-#endif /* ndef __FreeBSD__ */
- fd = open("/dev/tty", O_RDONLY);
- if ( fd )
- {
- /* no error check here */
- ioctl( fd, TIOCNOTTY,0 );
- close ( fd );
- }
-#endif /* 1 */
+
/*
* stderr (fd 2) will be closed later on,
* when the config file has been parsed.