repo: ngircd
action: commit
revision: 
path_from: 
revision_from: f6df13d5f812053281537bf8f7d282cff544caab:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit f6df13d5f812053281537bf8f7d282cff544caab
Author: Alexander Barton 
Date:   Tue Mar 22 18:57:08 2005 +0000

    When validationg the configuration file wait for a keypress only if both
    stdin and(!) stdout are valid tty's.

diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 255e194328f23f4be707bad775ef1ab4c2557ea4..
index ..ef73614f0a93ad592172dc2296c05ad1ec5cb689 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 
@@ -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( );

-----END OF PAGE-----