diff svr-chansession.c @ 667:fc7ae88e63b3

Rename HAVE_FORK to USE_VFORK It makes it a bit more obvious why there's a test there since HAVE_FORK is the normal case.
author Matt Johnston <matt@ucc.asn.au>
date Mon, 09 Apr 2012 20:35:13 +0800
parents 0ad95abf8d3c
children 405418f7dc5e
line wrap: on
line diff
--- a/svr-chansession.c	Sun Apr 08 01:50:52 2012 -0400
+++ b/svr-chansession.c	Mon Apr 09 20:35:13 2012 +0800
@@ -658,7 +658,7 @@
 
 	/* uClinux will vfork(), so there'll be a race as 
 	connection_string is freed below. */
-#ifdef HAVE_FORK
+#ifndef USE_VFORK
 	chansess->connection_string = make_connection_string();
 #endif
 
@@ -670,7 +670,7 @@
 		ret = ptycommand(channel, chansess);
 	}
 
-#ifdef HAVE_FORK	
+#ifndef USE_VFORK
 	m_free(chansess->connection_string);
 #endif
 
@@ -745,7 +745,7 @@
 		return DROPBEAR_FAILURE;
 	}
 	
-#ifndef HAVE_FORK
+#ifdef USE_VFORK
 	pid = vfork();
 #else
 	pid = fork();
@@ -865,7 +865,7 @@
 
 	/* with uClinux we'll have vfork()ed, so don't want to overwrite the
 	 * hostkey. can't think of a workaround to clear it */
-#ifdef HAVE_FORK
+#ifndef USE_VFORK
 	/* wipe the hostkey */
 	sign_key_free(svr_opts.hostkey);
 	svr_opts.hostkey = NULL;