kernel: dont pprint() into 9p channels
when fd 2 (stderr) points to a mount channel, dont cause protocol confusion by dumping error strings into it.
This commit is contained in:
parent
95524b1cdd
commit
093eaec219
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ pprint(char *fmt, ...)
|
|||
return 0;
|
||||
|
||||
c = up->fgrp->fd[2];
|
||||
if(c==nil || (c->mode!=OWRITE && c->mode!=ORDWR))
|
||||
if(c==nil || (c->flag&CMSG)!=0 || (c->mode!=OWRITE && c->mode!=ORDWR))
|
||||
return 0;
|
||||
n = snprint(buf, sizeof buf, "%s %lud: ", up->text, up->pid);
|
||||
va_start(arg, fmt);
|
||||
|
|
Loading…
Reference in a new issue