From aa47a717767798e5500a7451d1ce2d06317a9f1d Mon Sep 17 00:00:00 2001 From: Rick Bird Date: Mon, 18 Apr 2011 14:11:53 -0400 Subject: [PATCH] IssueID #240 (Misc Build System fixes) More work on getting console mode to work. Took an ifdef around a piece of code that was just for INFO_SLAVE(#undef INFO_SLAVE near top of file if COMPILE_CONSOLE is defined). Took out netmush detach code as well if COMPILE_CONSOLE is on. --- src/bsd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bsd.c b/src/bsd.c index 8365ca4..1dee0be 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -546,6 +546,7 @@ main(int argc, char **argv) } } +#ifndef COMPILE_CONSOLE #ifdef HAVE_FORK /* Fork off and detach from controlling terminal. */ if (detach_session) { @@ -565,6 +566,7 @@ main(int argc, char **argv) } } #endif +#endif #ifdef HAVE_GETPID if (pidfile) { @@ -725,6 +727,7 @@ main(int argc, char **argv) #endif close_sockets(); + sql_shutdown(); mush_lua_stop(); /* shutdown the lua environment */ @@ -1202,7 +1205,11 @@ shovechars(Port_t port, Port_t sslport __attribute__ ((__unused__))) if (notify_fd >= 0) FD_SET(notify_fd, &input_set); +#ifndef COMPILE_CONSOLE found = select(maxd, &input_set, &output_set, (fd_set *) 0, &timeout); +#else + found = select(2, &input_set, &output_set, (fd_set *) 0, &timeout); +#endif if (found < 0) { #ifdef WIN32 if (found == SOCKET_ERROR && WSAGetLastError() != WSAEINTR) -- 2.30.2