--- ansh/src/daemon3.c 2011/10/13 16:08:52 1.1.1.1.2.6 +++ ansh/src/daemon3.c 2011/10/14 12:03:10 1.1.1.1.2.7 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: daemon3.c,v 1.1.1.1.2.6 2011/10/13 16:08:52 misho Exp $ + * $Id: daemon3.c,v 1.1.1.1.2.7 2011/10/14 12:03:10 misho Exp $ * ************************************************************************* The ELWIX and AITNET software is distributed under the following @@ -175,6 +175,7 @@ fdTx(sched_task_t *task) if (proc->proc_flg != ANSH_FLG_CPOUT || !proc->proc_pid) return NULL; + /* if (waitpid(proc->proc_pid, &wlen, WNOHANG)) { ioFreePTY(TASK_FD(task), proc->proc_ttyname); schedCancelby(TASK_ROOT(task), NULL, CRITERIA_FD, (void*) TASK_FD(task), NULL); @@ -187,6 +188,7 @@ fdTx(sched_task_t *task) schedWrite(TASK_ROOT(task), icmpTx, proc, proc->proc_sock); return NULL; } + */ /* if Timeout defined, disarm timer */ if (Timeout) @@ -197,6 +199,7 @@ fdTx(sched_task_t *task) case -1: ERR("write2tty #%d - %s", errno, strerror(errno)); /* exit from shell and release tty */ + /* waitpid(proc->proc_pid, &wlen, 0); ioFreePTY(TASK_FD(task), proc->proc_ttyname); schedCancelby(TASK_ROOT(task), NULL, CRITERIA_FD, (void*) TASK_FD(task), NULL); @@ -207,6 +210,7 @@ fdTx(sched_task_t *task) proc->proc_rlen_[FD2NET] = 0; schedWrite(TASK_ROOT(task), icmpTx, proc, proc->proc_sock); + */ return NULL; default: proc->proc_flg = ANSH_FLG_OK; @@ -237,6 +241,7 @@ fdRx(sched_task_t *task) if (!proc->proc_pid) return NULL; + /* if (waitpid(proc->proc_pid, &rlen, WNOHANG)) { ioFreePTY(TASK_FD(task), proc->proc_ttyname); schedCancelby(TASK_ROOT(task), NULL, CRITERIA_FD, (void*) TASK_FD(task), NULL); @@ -249,6 +254,7 @@ fdRx(sched_task_t *task) schedWrite(TASK_ROOT(task), icmpTx, proc, proc->proc_sock); return NULL; } + */ /* if Timeout defined, disarm timer */ if (Timeout) @@ -262,6 +268,7 @@ fdRx(sched_task_t *task) ERR("readtty #%d - %s", errno, strerror(errno)); case 0: /* exit from shell and release tty */ + /* waitpid(proc->proc_pid, &rlen, 0); ioFreePTY(TASK_FD(task), proc->proc_ttyname); schedCancelby(TASK_ROOT(task), NULL, CRITERIA_FD, (void*) TASK_FD(task), NULL); @@ -273,6 +280,7 @@ fdRx(sched_task_t *task) proc->proc_rlen_[FD2NET] = 0; schedWrite(TASK_ROOT(task), icmpTx, proc, proc->proc_sock); + */ return NULL; default: proc->proc_flg = ANSH_FLG_OK;