diff options
author | Sunil Nimmagadda <sunil@sunilnimmagadda.com> | 2014-04-10 18:15:20 +0500 |
---|---|---|
committer | Sunil Nimmagadda <sunil@sunilnimmagadda.com> | 2014-04-10 18:15:20 +0500 |
commit | e7d2df8c667cf50c80631c1faa1a7e98ffb55de6 (patch) | |
tree | 360590d9d9dc441111a68f68118e0f5b259b1b6c | |
parent | 90be9f6501860a22f694ef1659bef4d9182154e8 (diff) |
Since we now waitpid on WAIT_ANY, pop3_main needed return pid.
-rw-r--r-- | pop3d.c | 3 | ||||
-rw-r--r-- | pop3d.h | 2 | ||||
-rw-r--r-- | pop3e.c | 4 |
3 files changed, 4 insertions, 5 deletions
@@ -47,7 +47,6 @@ static enum m_type m_type(const char *); static void usage(void); static struct imsgev iev_pop3e; -static pid_t pop3e_pid; static const char *mpath = MBOX_PATH; static int mtype = M_MBOX; @@ -99,7 +98,7 @@ main(int argc, char *argv[]) if ((pw = getpwnam(POP3D_USER)) == NULL) fatalx("main: getpwnam " POP3D_USER); - pop3e_pid = pop3_main(pair, pw); + pop3_main(pair, pw); close(pair[1]); setproctitle("[priv]"); logit(LOG_INFO, "pop3d ready; type:%s, path:%s", mtype_str, mpath); @@ -144,7 +144,7 @@ struct session { }; /* pop3e.c */ -pid_t pop3_main(int [2], struct passwd *); +void pop3_main(int [2], struct passwd *); /* session.c */ void session_init(struct listener *, int); @@ -47,7 +47,7 @@ static void sig_handler(int, short, void *); struct imsgev iev_pop3d; void *ssl_ctx; -pid_t +void pop3_main(int pair[2], struct passwd *pw) { extern struct session_tree sessions; @@ -59,7 +59,7 @@ pop3_main(int pair[2], struct passwd *pw) fatal("pop3e: fork"); if (pid > 0) - return (pid); + return; close(pair[0]); setproctitle("pop3 engine"); |