Commit Briefs

Russ Cox

libthread: add threadmaybackground

Programs that want to background themselves now need to define threadmaybackground returning 1. This avoids a confusing (to people and debuggers) extra parent process for all the threaded programs that will never want to background themselves.


Dan Cross

Trivial changes: whitespace and modes.

Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>


David du Colombier

9pserve: fix memory leak in warning


Russ Cox

delete 9P2000.u

thanks to Erik Quanstrom R=rsc http://codereview.appspot.com/3469042



Russ Cox

Related to issue

http://bitbucket.org/rsc/plan9port/issue/38/ This patch tries to make 9pserve work again with 9P2000 clients, in case the server handled by 9pserve expects 9P2000.u. (Since changeset http://bitbucket.org/rsc/plan9port/changeset/d9843471f0bc/ servers using srv() stop communicating after they received a 9P2000 msg that has a different .u definition.) Tattach, Tauth and Tcreate 9P2000 messages will be translated now, if neccessary, to 9P2000.u by growing them to the new size, and providing the missing (default) values. The code of the first two message types has been tested with drawterm on linux (dialing factotum), and mounts from within 9vx to plan9port's factotum and dossrv. The code for Tcreate couldn't be tested due to lack of file servers both speaking 9P2000.u and allowing file creation. R=rsc_swtch, rsc CC=codebot http://codereview.appspot.com/151052


Russ Cox

9pserve: add -c option




Russ Cox

9pserve: fix a new race involving assert(c->nmsg == 0).

Just like outputthread can have processed the message but not yet called msgput, the same is true of the connoutthread, so we cannot check c->nmsg until after the connoutthread has shut down gracefully.


Russ Cox

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.




rsc

paranoia about extension


rsc

paranoia about extension