plan9port/src/cmd
Russ Cox 841d71b5c6 9pserve: fix races causing assert(c->nmsg == 0) to fail.
1. Could happen that connoutthread sends c->outq a nil
just before the regular input handler sends c->outq a real message.
When the connoutthread gets the nil it will free c->outq,
leaving the real message unprocessed.

2. Could happen that the outputthread writes a message
body to the remote 9P server and then a response comes
in and then the connection gets torn down, all before the
outputthread manages to call msgput(m).
Thanks to David Swasey for identifying this scenario.

Also change yield() loop into explicit communication.

Also remove dead code involving hungup queues.
2007-08-22 08:55:08 -04:00
..
9pfuse add -a aname 2007-06-21 02:11:21 +00:00
9term correct dump string (Fazlul Shahriar) 2007-04-17 05:43:22 +00:00
9660 Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
acid Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
acidtypes Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
acme --chatty 2007-06-23 06:27:57 +00:00
astro Use va_args in cosadd/sinadd (Michael Teichgräber) 2006-05-27 18:35:26 +00:00
auth warnings (andrey) 2006-04-20 20:24:58 +00:00
auxstats xnet (Jeff Sickel) 2007-04-14 14:59:27 +00:00
bzip2 Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
cb try to handle Beof in the macros (Michael Teichgräber) 2007-03-25 18:32:51 +00:00
db Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
devdraw report target list as 32-bit chunks, not 8-bit, for OS X 2007-05-04 02:19:18 +00:00
dict Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
diff Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
draw import statusbar, converted to libthread (Lou Kamenov) 2007-03-25 17:19:30 +00:00
eqn 64-bit 2006-04-20 21:21:05 +00:00
faces Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
getflags NetBSD-macppc ctype needs uchars. 2005-09-09 23:16:15 +00:00
grap fix double-fclose (Gabi Diaz) 2007-04-13 12:16:37 +00:00
graph no c99 isms 2006-05-31 04:55:43 +00:00
grep no need to be so forward about it 2007-05-03 22:27:52 +00:00
gzip shut up gcc! 2006-04-20 20:28:08 +00:00
hoc shut up, gcc! 2006-04-20 20:30:55 +00:00
htmlfmt Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
htmlroff warn about \w no arg 2007-04-21 22:37:13 +00:00
index
ip read pcap 2007-05-02 19:58:17 +00:00
jpg Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
lex bug fix 2006-04-20 21:51:05 +00:00
lp Changes. 2005-08-31 02:20:12 +00:00
map system tan() is probably good enough 2006-04-21 04:00:56 +00:00
mk unix fix 2007-04-21 22:36:01 +00:00
mnihongo
mpm make compile 2006-02-17 18:21:29 +00:00
ndb add sys/time.h for struct timeval on freebsd 4 2006-05-06 19:55:11 +00:00
netfiles Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
page fix troff input (Colin DeVilbiss) 2007-05-05 13:08:06 +00:00
pic Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
plot Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
plumb Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
postscript Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
proof darwin 2006-04-21 04:26:02 +00:00
rc keep path and PATH in sync 2007-03-28 16:04:37 +00:00
rio use new mkwsysrules.sh location 2006-06-25 19:19:28 +00:00
sam better fix 2007-06-09 05:17:47 +00:00
samterm Better tick management - no frdrawseltick calls. 2007-05-10 19:27:45 +00:00
scat Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
snarfer -ldraw no longer implies -lX11 2007-02-22 14:27:45 +00:00
spell Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
tapefs plan 9 import 2006-05-21 18:24:59 +00:00
tbl cast 2006-04-20 22:56:08 +00:00
tcs avoid hang with htmlroff (Michael Teichgräber) 2006-10-12 02:43:52 +00:00
tpic oops 2006-04-20 23:06:55 +00:00
troff fix random troff crash (Noel Hunt) 2007-05-08 02:52:21 +00:00
troff2html fix again 2007-03-25 17:28:01 +00:00
upas mailfs: fix subject formatting 2007-06-25 02:42:09 +00:00
vac print + new files in verbose mode (Michael Kaminsky) 2007-01-18 18:34:46 +00:00
vbackup always write last block in vcat (dave swasey) 2007-06-12 18:35:37 +00:00
venti OS X crap 2007-05-04 01:42:24 +00:00
.cvsignore Ignore more. 2005-09-13 00:42:27 +00:00
9p.c seek back in rdwr 2006-02-14 19:41:02 +00:00
9pserve.c 9pserve: fix races causing assert(c->nmsg == 0) to fail. 2007-08-22 08:55:08 -04:00
acmeevent.c
ascii.c
auxclog.c libc conflict on os x 2007-03-15 17:35:43 +00:00
basename.c
bc.y 64-bit safe. (Taj Khattra) 2005-10-31 19:57:47 +00:00
cal.c
calendar.c I just hate to be pushed around by some @#$%^& machine. 2005-07-19 18:00:07 +00:00
cat.c
cleanname.c
cmp.c
comm.c
core.c do not readdir files - from zoltan jarai 2005-01-30 19:45:08 +00:00
date.c
dc.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
dd.c
delatex.lx why bother? 2005-01-30 16:48:14 +00:00
deroff.c no wide character constants; sigh 2005-05-07 22:42:06 +00:00
dformat
dial.c send output to fd instead of 0 2005-02-11 16:42:48 +00:00
du.C
echo.c
ed.c better cleanup; use /var/tmp 2006-07-23 14:43:21 +00:00
factor.c
file.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
fmt.c avoid double spacing 2006-05-10 04:13:56 +00:00
fortune.c
freq.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
fsize.c
hget.c print final verbose update (Lou Kamenov) 2006-10-12 01:47:30 +00:00
hist.c apple 2005-07-13 21:34:11 +00:00
idiff.c invoke plan9 diff 2005-07-14 00:09:44 +00:00
import.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
join.c I just hate to be pushed around by some @#$%^& machine. 2005-07-19 18:00:07 +00:00
listen1.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
look.c no wide character constants; sigh 2005-05-07 22:42:06 +00:00
ls.C Make ls -lF work. 2007-01-29 15:12:42 +00:00
md5sum.C
mkdir.C
mkfile add page (Kris Maglione) 2007-03-26 20:55:26 +00:00
mtime.c
namespace.c
netkey.c changes 2005-02-11 19:51:21 +00:00
news.c
p.c
pbd.c
pr.c
primes.c
ramfs.c less chatty 2007-06-05 21:34:14 +00:00
read.c
readcons.c new program readcons 2005-02-13 18:03:41 +00:00
resample.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
rm.c
sed.c add -l flag 2006-06-26 00:03:55 +00:00
seq.c new seq from plan 9 (Anthony Martin) 2006-10-12 01:42:11 +00:00
sftpcache.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
sha1sum.c
sleep.c
sort.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
split.c I just hate to be pushed around by some @#$%^& machine. 2005-07-19 18:00:07 +00:00
srv.c new note group 2006-02-04 20:21:36 +00:00
strings.c no /fd/ 2005-11-12 16:43:07 +00:00
sum.c
tail.c I just hate to be pushed around by some @#$%^& machine. 2005-07-19 18:00:07 +00:00
tar.c silence warning (andrey) 2006-04-20 20:18:13 +00:00
tee.c
test.c oops 2007-05-21 21:09:24 +00:00
time.c
touch.c print error if changing time fails 2007-05-20 14:37:29 +00:00
tr.c
unicode.c
uniq.c I just hate to be pushed around by some @#$%^& machine. 2005-07-19 18:00:07 +00:00
units.y Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
unutf.c
wc.c Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
xd.c
yacc.c write YYARG def to ftable (fdefine might be null, and is not the right place anyway) 2007-01-29 16:46:16 +00:00