+ if(block(plex, EV_WRITE, 60) <= 0)
+ goto out;
+ if(socketpair(PF_UNIX, SOCK_STREAM, 0, pfds))
+ goto out;
+ if(sendreq(plex, req, pfds[0]))
+ goto out;
+ close(pfds[0]);
+ cfd = pfds[1];
+
+ /*
+ * If there is message data, pass it:
+ */
+ if((hd = getheader(req, "content-length")) != NULL) {
+ dlen = atoo(hd);
+ if(dlen > 0) {
+ if(passdata(fd, cfd, &inbuf, dlen) < 0)
+ goto out;
+ }
+ }
+ /* Make sure to send EOF */
+ shutdown(cfd, SHUT_WR);