From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 4 Dec 2009 20:36:29 -0700 From: Lyndon Nerenberg To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: <20091205031747.GA8759@nipl.net> Message-ID: References: <20091205031747.GA8759@nipl.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [9fans] ideas for helpful system io functions Topicbox-Message-UUID: a7e3f456-ead5-11e9-9d60-3106f5b1d025 > Another example, a little server that allows connections on a single port 443 > for https and ssh. Ideally after reading the "GET" or ssh banner, it can just > exec whichever server is needed (or fork and exec something like netcat). but > in fact due to this "already read some data" problem, it has to stay alive and > copy the data in and out from the other server. It shouldn't be too difficult to write a device that allows file descriptors to be passed from one process to another. The functionality is quite useful. BSD has supported this since the dawn of time (SCM_RIGHTS), and I have used it in a few commercial network server products over the years. (Later System Vs have it as well, and Solaris supports it through their "doors" API. Stevens Vol. 2 describes the various APIs.) --lyndon