Re: [9fans] mounting stdin using 9pfuse
it appears that I'm missing something fundamental in how 9pfuse (the one written by Russ) works when it is given - as an address. The source looks like it should be simply using stdin for R/W instead of dialing out the connection first, but it doesn't really seem to work. Here's the simplest way of reproducing what I'm seeing: I don't know why your example doesn't work, but ramfs simply may not work with 9pfuse. I would try doing something a little more complicated, like dial tcp!sources.cs.bell-labs.com!9fs and then run 9pfuse - with that on standard input. 9fans is a fine list to ask about plan9port. Russ
Re: [9fans] mounting stdin using 9pfuse
On Mon, 2008-10-06 at 09:31 -0700, Russ Cox wrote: it appears that I'm missing something fundamental in how 9pfuse (the one written by Russ) works when it is given - as an address. The source looks like it should be simply using stdin for R/W instead of dialing out the connection first, but it doesn't really seem to work. Here's the simplest way of reproducing what I'm seeing: I don't know why your example doesn't work, but ramfs simply may not work with 9pfuse. Any particular reason for that? I'm asking simply because ramfs appears to be quite broken on my system. In fact, I can't make it work at all. Has it bitrotted? I would try doing something a little more complicated, like dial tcp!sources.cs.bell-labs.com!9fs and then run 9pfuse - with that on standard input. That, actually, seems to work fine. Although I'm about to give it more stress testing. 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? Thanks, Roman.
Re: [9fans] mounting stdin using 9pfuse
On Sat, Oct 4, 2008 at 3:18 AM, Roman V. Shaposhnik [EMAIL PROTECTED] wrote: it appears that I'm missing something fundamental in how 9pfuse (the one written by Russ) works when it is given - as an address. Seems to work here on linux after: #include error.h #include errno.h +#include unistd.h void socket012(int fd) { int i; - for (i=0; i3; i++) { + for (i=0; i2; i++) { close(i); dup2(fd, i); if (fork()) { socket012(fd[0]); - execlp(9pfuse, 9pfuse, -, /tmp/fuse, (char*)0); + execlp(9pfuse, 9pfuse, -D, -, /tmp/fuse, (char*)0); } else { socket012(fd[1]); ls -l caused a failed assertion in ramfs, but it was going. Can't justify why the diff works, but before adding -D and changing 3 - 2 I didn't have any success. Would love to look into it further but in the interest of not destroying my work schedule this week I'm going to get some damn sleep. Good luck. -sqweek