Closed GoogleCodeExporter closed 9 years ago
myconfig.c中static void checkRunning(int exitFlag, int daemonMode)函数
else if (fl.l_type != F_UNLCK) {
printf(_("!! MentoHUST已经运行(PID=%d)!\n"), fl.l_pid);
//exit(EXIT_FAILURE);
}
实在想不出跑多个实例有什么好处。
Original comment by www.eh...@gmail.com
on 2 May 2011 at 2:31
呃。我确实是注释
掉了这个退出语句,但刚刚测试的话,运行到
printf后,后面出不来选择网卡列表
多个实例的话。比如 ,跑校内PT ,可以上200M的带宽 。。
Original comment by amplat...@gmail.com
on 2 May 2011 at 2:34
Welcome to MentoHUST Version: 0.3.1
Copyright (C) 2009-2010 HustMoon Studio
Bug report to http://code.google.com/p/mentohust/issues/list
!! MentoHUST is already running(PID=2791)!
sdf
就卡在这 要停掉另一边的认证后 这边才继续 ,是 pid
文件的问题?
Original comment by amplat...@gmail.com
on 3 May 2011 at 1:07
else if (fl.l_type == F_UNLCK) {
fl.l_type = F_WRLCK;
fl.l_pid = getpid();
if (fcntl(lockfd, F_SETLKW, &fl) < 0) {
perror(_("!! 加锁失败"));
goto error_exit;
}
} else {
printf(_("!! MentoHUST已经运行(PID=%d)!\n"), fl.l_pid);
}
if (daemonMode) { /* 貌似我过早进入后台模式了,就给个选项保留输出或者输出到文件吧 */
printf(_(">> 进入后台运行模式,使用参数-k可退出认证。\n"));
if (daemon(0, (daemonMode+1)%2))
perror(_("!! 后台运行失败"));
else if (daemonMode == 3) {
freopen(LOG_FILE, "w", stdout);
setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ);
freopen(LOG_FILE, "a", stderr);
}
}
不过-k参数只能退出第一个。
Original comment by www.eh...@gmail.com
on 3 May 2011 at 3:35
Original comment by www.eh...@gmail.com
on 25 Jun 2011 at 11:18
Original issue reported on code.google.com by
amplat...@gmail.com
on 2 May 2011 at 2:09