}
chan_is_dead(Channel *c){	if (c->flags & CHAN_DEAD)		return 1;	if (c->istate != CHAN_INPUT_CLOSED || c->ostate != CHAN_OUTPUT_CLOSED)		return 0;	if (!compat20) {		debug("channel %d: is dead", c->self);		return 1;	}	/*	 * we have to delay the close message if the efd (for stderr) is	 * still active	 */	if (((c->extended_usage != CHAN_EXTENDED_IGNORE) &&	    buffer_len(&c->extended) > 0)#if 0	    || ((c->extended_usage == CHAN_EXTENDED_READ) &&	    c->efd != -1)#endif	    ) {		debug2("channel %d: active efd: %d len %d type %s",		    c->self, c->efd, buffer_len(&c->extended),		    c->extended_usage==CHAN_EXTENDED_READ ?		       "read": "write");	} else {		if (!(c->flags & CHAN_CLOSE_SENT)) {			chan_send_close2(c);		}		if ((c->flags & CHAN_CLOSE_SENT) &&		    (c->flags & CHAN_CLOSE_RCVD)) {			debug("channel %d: is dead", c->self);			return 1;		}	}	return 0;}