On Tue, Oct 7, 2008 at 11:47 AM, Roman V. Shaposhnik <[EMAIL PROTECTED]> wrote:
> Here's a question thought:
> by default 9pserve only listens on an AF_UNIX socket what
> would be the best way to connect it to the AF_INET one?

 Enrico did some work on this, see
http://9fans.net/archive/2008/06/150 ... which doesn't include the
patch he attached:

Index: src/cmd/9pserve.c
===================================================================
--- src/cmd/9pserve.c   (revision 707)
+++ src/cmd/9pserve.c   (working copy)
@@ -136,7 +136,7 @@
 void
 usage(void)
 {
-       fprint(2, "usage: 9pserve [-lnv] [-A aname afid] [-M msize] address\n");
+       fprint(2, "usage: 9pserve [-c pipe] [-lnv] [-A aname afid] [-M
msize] address\n");
        fprint(2, "\treads/writes 9P messages on stdin/stdout\n");
        threadexitsall("usage");
 }
@@ -157,6 +157,19 @@
        ARGBEGIN{
        default:
                usage();
+       case 'c':
+       {
+               char* pipename = EARGF(usage());
+               printf("pipename=\"%s\"\n", pipename);
+
+                if((fd = dial(pipename, nil, nil, nil)) < 0)
+                   sysfatal("dial %s: %r");
+               dup(fd, 0);
+               dup(fd, 1);
+               if(fd > 1)
+                   close(fd);
+       }
+       break;  
        case 'A':
                attached = 1;
                xaname = EARGF(usage());

 And this is the discussion he referred to:

http://9fans.net/archive/2008/05/354
http://9fans.net/archive/2008/06/3
http://9fans.net/archive/2008/06/5
http://9fans.net/archive/2008/06/9
http://9fans.net/archive/2008/06/11
http://9fans.net/archive/2008/06/12
http://9fans.net/archive/2008/06/45
http://9fans.net/archive/2008/06/53

 (Sometimes 9fans.net's lack of threading is a pain).
-sqweek

Reply via email to