Mercurial > dropbear
comparison svr-session.c @ 666:0ad95abf8d3c
check for fork() and not __uClinux__
author | Mike Frysinger <vapier@gentoo.org> |
---|---|
date | Sun, 08 Apr 2012 01:50:52 -0400 |
parents | b5cc8878d5ec |
children | fc7ae88e63b3 |
comparison
equal
deleted
inserted
replaced
665:4d9511f98462 | 666:0ad95abf8d3c |
---|---|
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 #ifdef __uClinux__ | 87 #ifndef HAVE_FORK |
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 #ifdef __uClinux__ | 160 #ifndef HAVE_FORK |
161 /* only the main server process should cleanup - we don't want | 161 /* 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 | 164 #else |
165 if (1) | 165 if (1) |