if (c && c->ctl_chan != -1) {
chan_read_failed(c);
chan_write_failed(c);
c->detach_user(c->self, NULL);
return 0;
} else
quit_pending = 1;