comparison svr-chansession.c @ 331:d6b8815a9b5e

progress towards exiting on writefd closure rather than on process exit - dbclient hangs with scp, so requires work.
author Matt Johnston <matt@ucc.asn.au>
date Sun, 11 Jun 2006 16:19:32 +0000
parents 3eea61bd9993
children 2eb5a8514905 e7c1a77d2921
comparison
equal deleted inserted replaced
330:5488db2e9e4e 331:d6b8815a9b5e
65 65
66 /* required to clear environment */ 66 /* required to clear environment */
67 extern char** environ; 67 extern char** environ;
68 68
69 static int sesscheckclose(struct Channel *channel) { 69 static int sesscheckclose(struct Channel *channel) {
70 struct ChanSess *chansess = (struct ChanSess*)channel->typedata; 70 return channel->writefd == -1;
71 return chansess->exit.exitpid >= 0;
72 } 71 }
73 72
74 /* Handler for childs exiting, store the state for return to the client */ 73 /* Handler for childs exiting, store the state for return to the client */
75 74
76 /* There's a particular race we have to watch out for: if the forked child 75 /* There's a particular race we have to watch out for: if the forked child