about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2005-03-22 18:57:08 +0000
committerAlexander Barton <alex@barton.de>2005-03-22 18:57:08 +0000
commitf6df13d5f812053281537bf8f7d282cff544caab (patch)
tree71d67222a9731f7418fb89585feaf8af825e61cd /src
parentf56a1bdf20a54bf2ee92bde9c9d3b6b1595b8934 (diff)
downloadngircd-f6df13d5f812053281537bf8f7d282cff544caab.tar.gz
ngircd-f6df13d5f812053281537bf8f7d282cff544caab.zip
When validationg the configuration file wait for a keypress only if both
stdin and(!) stdout are valid tty's.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 255e1943..ef73614f 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: conf.c,v 1.74 2005/03/20 15:00:25 fw Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.75 2005/03/22 18:57:08 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -105,8 +105,9 @@ Conf_Test( void )
 	Read_Config( );
 	Validate_Config( true );
 
-	/* If stdin is a valid tty wait for a key: */
-	if( isatty( fileno( stdin )))
+	/* If stdin and stdout ("you can read our nice message and we can
+	 * read in your keypress") are valid tty's, wait for a key: */
+	if( isatty( fileno( stdin )) && isatty( fileno( stdout )))
 	{
 		puts( "OK, press enter to see a dump of your service configuration ..." );
 		getchar( );