From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net Date: Sat, 5 Dec 2009 09:56:41 -0800 From: Skip Tavakkolian <9nut@9netics.com> In-Reply-To: <95f2d7dfe04392a1c50b5e3e42282ebb@9netics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] ideas for helpful system io functions Topicbox-Message-UUID: a8a7a356-ead5-11e9-9d60-3106f5b1d025 >> I would like to pass the extra buffered data to the guy I am execing then let >> him read the rest directly from the socket, but I see no existing way to do >> that. > > httpd passes the headers and any left over buffer it has already read to /magic > apps through a command line param. there's a function for parsing and placing > the "unread" stuff in the input buffer that's tied to the fd. > > /sys/src/libhttpd/hio.c:233: hunload(Hio *h) also: /sys/src/libhttpd/hio.c:274: hload(Hio *h, char *buf) /sys/src/cmd/ip/httpd/init.c:23: init(int argc, char **argv)