From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 5 Oct 2008 20:46:44 -0700 From: "Roman V. Shaposhnik" In-reply-to: <140e7ec30810050835jdf02297g4a89eadf103826f0@mail.gmail.com> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-id: <1223264804.6352.33.camel@goose.sun.com> MIME-version: 1.0 Content-type: text/plain Content-transfer-encoding: 7BIT References: <1223061499.22031.9.camel@goose.sun.com> <140e7ec30810050835jdf02297g4a89eadf103826f0@mail.gmail.com> Subject: Re: [9fans] mounting stdin using 9pfuse Topicbox-Message-UUID: 17416452-ead4-11e9-9d60-3106f5b1d025 Hi! Thanks for replying. You're the only one so far, which makes me wonder whether there's a more appropriate place for plan9port discussions. On Sun, 2008-10-05 at 23:35 +0800, sqweek wrote: > On Sat, Oct 4, 2008 at 3:18 AM, Roman V. Shaposhnik 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 > #include > +#include > > void socket012(int fd) > { > int i; > - for (i=0; i<3; i++) { > + for (i=0; i<2; 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. Yeah, that tripped me too. In fact, I'm wondering whether ramfs works as advertised at all. I wasn't able to make it work on: $ uname -a Linux goose 2.6.22.17-0.1-default #1 SMP 2008/02/10 20:01:04 UTC x86_64 x86_64 x86_64 GNU/Linux > Can't justify why the diff works, but before adding -D and changing 3 -> 2 I > didn't have any success. It seems to be flaky on my end. It looks like a race condition but I haven't investigated further yet. > 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. I hear you... Thanks, Roman.