Conversation with #inferno at Sun Apr 22 12:37:36 2012 on powerman-asdf@irc.freenode.net (irc) (19:19:35) Fish- [~Fish@9fans.fr] entered the room. (21:28:11) anth_x1 [~a@adsl-99-40-132-132.dsl.bcvloh.sbcglobal.net] entered the room. (21:37:53) Fish- left the room (quit: *.net *.split). (21:37:53) anth_x left the room (quit: *.net *.split). (21:37:53) dreadlorde left the room (quit: *.net *.split). (21:46:36) Fish- [~Fish@9fans.fr] entered the room. (21:53:57) anth_x1 is now known as anth_x (05:01:22) fr1tz [~fr1tz@195-202-241-126.dynamic.hispeed.ch] entered the room. (05:27:29) fr1tz: hi everybody. i've only just recently started to dig into inferno and was wondering: is there already something like a file-server version of listen(1)? something that runs a cmd for each open() but serves a file instead of listening for network connections? (05:59:15) leetspete: fr1tz: You can do that, I think. (06:37:07) fr1tz: leetspete: What's the easiest way to do it? (07:28:57) leetspete: fr1tz: You can mount a pipe. I'm actually fuzzy on the details; sorry. (And also for the late reply.) (07:29:02) leetspete: I'm somewhat new to the OS. (07:38:23) fr1tz: leetspete: The crux is that every Topen on the file spawns the command. (07:38:55) leetspete: Ah, I see what you mean. (07:39:30) fr1tz: leetspete: Yeah I just re-read my first message. Wasn't too clear :) (07:41:12) Fish- left the room (quit: Quit: WeeChat 0.3.7). (07:41:26) leetspete: Yeah, I was thinking you meant something like the Inferno equivalent of a Unix domain socket. (07:57:44) KBme left the room (quit: *.net *.split). (07:57:45) leetspete left the room (quit: *.net *.split). (08:14:21) KBme [~KBme@2001:470:cabe:dead:beef:feed:dead:beef] entered the room. (08:14:21) leetspete [~pete@cpe-76-174-173-118.socal.res.rr.com] entered the room. (08:21:53) fr1tz: leetspete: Maybe I'm trying to solve the wrong problem. Here's what I want to do: Clients can mount the server without any auth taking place. The client then sees a bunch of public data files and a bunch of files that represent other 9p servers. Something like: % mount -A tcp!server!1234 /n/blarg && mount /n/blarg/srv1 /n/srv1 (08:23:59) leetspete: I could definitely be wrong about this, but it seems like you'd need to use the Styx module and spawn things yourself. I've been poking at man pages. (08:24:46) leetspete: Oh, for the case you are talking about, am I crazy for thinking bind is what you want? (08:25:02) leetspete: Or mount {some script} /n/srv1? (08:26:36) fr1tz: leetspete: The client would have to auth when mounting srv1. Mounting blarg just gives the possibility to mount srv1 via a file. (08:27:36) leetspete: Even for, say, (08:28:52) leetspete: Nah, wait, I was about to say something crazy. (08:33:13) leetspete: export(4) with the file argument? I am not sure... (08:34:12) leetspete: fr1tz: Actually, it looks like bind(1) can take a file rather than a directory, and accept a directory to put it into; does that work for what you're doing? (08:36:30) leetspete: So (untested), you could do bind /n/blarg/srv1 /n, I think. (08:37:10) fr1tz: leetspete: The problem is how to implement the /n/blarg/srv1 file server-side. (08:42:23) fr1tz: leetspete: I was going to write a "srvcmd filename cmd [args]" file server. it would serve styx on stdin/stdout, synthesizing filename and then spawning cmd for every Topen on filename, shuffling writes to the cmds stdin and reads from the cmds stdout. (08:43:02) leetspete: Right, but it seems obvious enough that you figure it must have been written already. (08:43:10) leetspete: I'd figure it must have been written already. (08:43:25) fr1tz: leetspete: I thought the same, but haven't found anything yet :) (08:43:43) leetspete: Right, I think I get what you're saying, then, haha. (08:44:21) leetspete: If it seems that obvious, what are we missing if it's not there? (08:48:50) leetspete: I mean, I'm saying I get what you're saying; I don't know the answer to that question. (08:49:29) leetspete: For my part...I haven't gotten auth to work properly. I've been at it a while; losing my head, haha. I think it has to do with a crash in keyfs. :P (08:50:48) Gegemon [~ynv@mx1.airis.ru] entered the room. (08:54:29) fr1tz: leetspete: Hmm... is the option to supply a filename as src to mount even used? Certainly doesn't seem common. Maybe it's just a leftover from plan9, and the "inferno way" of doing things is to use and serve services using network addresses rather than files? Just a thought, don't know much yet about inferno :) (09:00:57) leetspete: Oh, okay, okay, so (09:01:28) Fish- [~Fish@9fans.fr] entered the room. (09:03:00) leetspete: You can mount {cmd}, right? And have cat (or something) read and write the file? (09:03:05) leetspete: I think that might do what you want. (09:03:41) leetspete: Two cats, I think you'd need in the braces. (09:04:17) leetspete: It'd be an ugly command, but I think that does it? Auth would go through, etc. (09:04:20) leetspete: I believe. (09:04:36) leetspete: I have to take off; I'm up a little later than I can be. (09:04:59) leetspete: Sorry I couldn't be of more help. (09:06:05) fr1tz: No problem, good night :) (10:57:58) wrtp [~rog@host-92-23-139-156.as13285.net] entered the room. (12:33:53) The account has disconnected and you are no longer in this chat. You will be automatically rejoined in the chat when the account reconnects.