From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <7903b150795a13800e12d9942dec1469@centurytel.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] 9p srv-ing on a port From: "Skip Tavakkolian" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Fri, 16 Jan 2004 16:56:50 -0800 Topicbox-Message-UUID: bb80a24c-eacc-11e9-9e20-41e7f4b1d025 > Is it possible (i.e. simple enough) to set up a 9p server that will > work on a port a-la fossil/kfs? > > Instead of doing postmountsrv() is it possible to do listen() - > accept() - fork and srv(s) with the network fd? What should s->infd > and s->outfd be set to in this case? If I understand correctly, the following will work: If you have a corresponding /bin/service/tcpXXXX script just launch your server, then you could have an option for your server where it uses the stdin (opened for read/write) to do the 9P transactions. Look at cpu -R for example and see how tcp17010 is launched.