comparison svr-session.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 c519b78b6d1a
comparison
equal deleted inserted replaced
666:0ad95abf8d3c 667:fc7ae88e63b3
82 crypto_init(); 82 crypto_init();
83 common_session_init(sock, sock); 83 common_session_init(sock, sock);
84 84
85 /* Initialise server specific parts of the session */ 85 /* Initialise server specific parts of the session */
86 svr_ses.childpipe = childpipe; 86 svr_ses.childpipe = childpipe;
87 #ifndef HAVE_FORK 87 #ifdef USE_VFORK
88 svr_ses.server_pid = getpid(); 88 svr_ses.server_pid = getpid();
89 #endif 89 #endif
90 svr_authinitialise(); 90 svr_authinitialise();
91 chaninitialise(svr_chantypes); 91 chaninitialise(svr_chantypes);
92 svr_chansessinitialise(); 92 svr_chansessinitialise();
155 "Exit before auth: %s", format); 155 "Exit before auth: %s", format);
156 } 156 }
157 157
158 _dropbear_log(LOG_INFO, fmtbuf, param); 158 _dropbear_log(LOG_INFO, fmtbuf, param);
159 159
160 #ifndef HAVE_FORK 160 #ifdef USE_VFORK
161 /* only the main server process should cleanup - we don't want 161 /* For uclinux only the main server process should cleanup - we don't want
162 * forked children doing that */ 162 * forked children doing that */
163 if (svr_ses.server_pid == getpid()) 163 if (svr_ses.server_pid == getpid())
164 #else
165 if (1)
166 #endif 164 #endif
167 { 165 {
168 /* free potential public key options */ 166 /* free potential public key options */
169 svr_pubkey_options_cleanup(); 167 svr_pubkey_options_cleanup();
170 168