1 Star 0 Fork 6

散漫小主 / iceftpd

forked from 冰雪不语 / iceftpd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
session.c 477 Bytes
一键复制 编辑 原始数据 按行查看 历史
冰雪不语 提交于 2015-08-31 13:07 . ~
#include "common.h"
#include "session.h"
#include "ftpproto.h"
#include "privparent.h"
#include "privsock.h"
#include "sysutil.h"
void begin_session(session_t *sess)
{
activate_oobinline(sess->ctrl_fd);
priv_sock_init(sess);
pid_t pid;
pid = fork();
if (pid < 0)
ERR_EXIT("fork");
if (pid == 0) {
// ftp
priv_sock_set_child_context(sess);
handle_child(sess);
} else {
// nobody
priv_sock_set_parent_context(sess);
handle_parent(sess);
}
}
C
1
https://gitee.com/YuXiaoXiang_930/iceftpd.git
git@gitee.com:YuXiaoXiang_930/iceftpd.git
YuXiaoXiang_930
iceftpd
iceftpd
master

搜索帮助