1 Star 0 Fork 6

张虎/iceftpd

forked from 冰雪不语/iceftpd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
session.c 477 Bytes
一键复制 编辑 原始数据 按行查看 历史
冰雪不语 提交于 2015-08-31 13:07 +08:00 . ~
#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);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/tzfuture/iceftpd.git
git@gitee.com:tzfuture/iceftpd.git
tzfuture
iceftpd
iceftpd
master

搜索帮助