diff svr-chansession.c @ 480:c302c7383282

- Get rid of some ugly #defines
author Matt Johnston <matt@ucc.asn.au>
date Mon, 15 Sep 2008 13:06:40 +0000
parents f11544d96354
children 357a2e2e9bcc
line wrap: on
line diff
--- a/svr-chansession.c	Mon Sep 15 12:51:50 2008 +0000
+++ b/svr-chansession.c	Mon Sep 15 13:06:40 2008 +0000
@@ -640,6 +640,9 @@
 	pid_t pid;
 	unsigned int i;
 
+	const int FDIN = 0;
+	const int FDOUT = 1;
+
 	TRACE(("enter noptycommand"))
 
 	/* redirect stdin/stdout/stderr */
@@ -669,8 +672,7 @@
 		}
 
 		/* redirect stdin/stdout */
-#define FDIN 0
-#define FDOUT 1
+
 		if ((dup2(infds[FDIN], STDIN_FILENO) < 0) ||
 			(dup2(outfds[FDOUT], STDOUT_FILENO) < 0) ||
 			(dup2(errfds[FDOUT], STDERR_FILENO) < 0)) {