--- libaitio/src/sock.c 2014/04/29 01:26:21 1.14.4.1 +++ libaitio/src/sock.c 2014/05/18 23:34:47 1.14.4.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: sock.c,v 1.14.4.1 2014/04/29 01:26:21 misho Exp $ +* $Id: sock.c,v 1.14.4.2 2014/05/18 23:34:47 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -53,12 +53,12 @@ io_closeClient(sched_task_t *task) sock_t *s = (sock_t*) cli->cli_parent; int stat; + schedCancelby(s->sock_root, taskMAX, CRITERIA_ARG, cli, NULL); + pthread_mutex_lock(&s->sock_mtx); TAILQ_REMOVE(&s->sock_cli, cli, cli_node); pthread_mutex_unlock(&s->sock_mtx); - schedCancelby(s->sock_root, taskMAX, CRITERIA_ARG, cli, NULL); - if (*cli->cli_name) ioFreePTY(cli->cli_pty, cli->cli_name); if (s->sock_prog) { @@ -301,6 +301,7 @@ io_bridgeClient(sched_task_t *task) break; case 0: cli->cli_pty = pty; + ioSetRAWMode(STDIN_FILENO, NULL); array_Args(cli->cli_cmdline, 0, " \t", &args); argv = array_To(args);