Skip to content
Snippets Groups Projects
Commit 39de47a8 authored by rswindell's avatar rswindell
Browse files

Display the prompt only in the interactive (non-daemon) mode.

parent ac17a4be
No related branches found
No related tags found
No related merge requests found
......@@ -1177,8 +1177,6 @@ int main(int argc, char** argv)
#endif /* Removed broken stuff */
prompt = "[Threads: %d Sockets: %d Clients: %d Served: %lu] (?=Help): ";
/* Post-INI command-line switches */
for(i=1;i<argc;i++) {
arg=argv[i];
......@@ -1661,8 +1659,12 @@ int main(int argc, char** argv)
if(!isatty(fileno(stdin))) /* redirected */
select(0,NULL,NULL,NULL,NULL); /* Sleep forever - Should this just exit the thread? */
else /* interactive */
else /* interactive */
#endif
{
prompt = "[Threads: %d Sockets: %d Clients: %d Served: %lu] (?=Help): ";
lputs(LOG_INFO,NULL); /* display prompt */
while(!terminated) {
#ifdef __unix__
if(!isatty(STDIN_FILENO)) { /* Controlling terminal has left us *sniff* */
......@@ -1744,6 +1746,7 @@ int main(int argc, char** argv)
}
lputs(LOG_INFO,""); /* redisplay prompt */
}
}
terminate();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment