Conversation with #inferno at Mon Apr 4 14:12:59 2011 on powerman-asdf@irc.freenode.net (irc) (14:47:24) mjl-: does anyone know a better way to close an fd than: spawn a prog, let it pctl(forkfd, list of pids-to-close}) (14:47:55) mjl-: list of fds-to-close* (14:48:03) mjl-: you could dup an fd over the fds-to-close (14:48:11) mjl-: but then you're just as stuck with the other fd's (14:50:45) mjl-: i was intrigued that "mount {mntgen} /tmp; unmount /tmp" left the mntgen process alive (14:51:25) mjl-: turns out appl/cmd/mount.b gives fds to both sides of the pipe the to program it runs. so mntgen has both sides of the pipes and never gets eof when reading styx messages. (14:51:28) mjl-: http://www.ueber.net/who/mjl/tmp/mount-fds.diff (14:51:44) mjl-: that patch just feels a bit awkward (15:18:54) KBme left the room (quit: Excess Flood). (15:19:48) tensai_cirno left the room (quit: Quit: Leaving). (15:20:57) KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] entered the room. (16:15:42) mjl-: jas: do you use the history mode in wm/run? (16:16:04) mjl-: or rather, would you miss it if i removed it? (16:16:19) mjl-: i actually want to remove the option of showing only the output of 1 command (16:16:44) mjl-: so you would always see the output of all commands, more like wm/sh is now (16:17:32) mjl-: now it's a bit awkward if programs that were started before the current one print text (16:17:48) mjl-: also, now i cannot implement /dev/cons & /dev/consctl (16:18:00) mjl-: plus, i'm not really using the history (16:18:29) mjl-: oh, i'm talking about the history of the commands input & outputs. not the input entry's command history (with up/down), that stays (16:20:16) mjl-: i may want to keep the split mode, with stdin/stdout/stderr shown separately. but only for newly output text. currently wm/run knows all the text in the text widgets itself, outside of tk. a bit of a waste (16:21:40) mjl-: hmm. i could still implement a "job control", where you can cycle through programs that are still alive, and killgrp them with Del (16:22:07) mjl-: but that's a different thing from managing their i/o's separately (17:00:20) tensai_cirno [~cirno@77.232.15.216] entered the room. (17:05:15) KBme left the room (quit: *.net *.split). (17:05:33) mjl- left the room (quit: *.net *.split). (17:07:53) KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] entered the room. (17:07:53) mjl- [mjl@2001:960:7b2::e0e0:1] entered the room. (17:19:56) KBme left the room (quit: *.net *.split). (17:19:59) mjl- left the room (quit: *.net *.split). (17:20:25) KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] entered the room. (17:20:25) mjl- [mjl@2001:960:7b2::e0e0:1] entered the room. (17:58:23) robot12 left the room (quit: Quit: Leaving.). (18:12:58) goozbach left the room (quit: Changing host). (18:12:58) goozbach [~goozbach@fedora/goozbach] entered the room. (18:13:38) anth [~a@72-160-98-179.dyn.centurytel.net] entered the room. (18:40:51) anth_r0 is now known as anth_r (18:48:29) jas: mjl: I've been using the arrow up/dn command history (18:48:32) jas: it helps prevent mouse hunting for long strings to be snarfed (18:50:17) mjl-: ok (18:50:24) mjl-: but not the history of the command output right? (18:51:40) powerman: > mjl-: does anyone know a better way to close an fd than: spawn a prog, let it pctl(forkfd, list of pids-to-close}) (18:51:40) powerman: I think problem is with FORKFD in first line of runcmd() (18:51:50) powerman: it probably should be NEWFD instead (18:52:13) powerman: with short list of wanted fds (18:53:39) mjl-: powerman-asdf: i thought that maybe a shell command could do some fd redirections that you'ld want to use in the {}'s of the mount (18:54:14) mjl-: eg: mount <>[4=2] {something using fd 4} /tmp (18:54:17) mjl-: perhaps a bit far fetched (18:59:10) powerman: mjl-: that sounds awful. someone open extra fd for mount process, which isn't aware about it, but that fd expected to go through mount untouched and used by custom process spawned by mount… (19:00:03) powerman: I don't think there existing apps which require this behaviour (19:00:19) powerman: and don't really think mount should bother about this (19:03:19) mjl-: i'm not even sure my example would normally work with sh & mount. but if mount claims to handle {} shell commands, it should. (19:03:23) mjl-: it's a bit strange to have it anyway (19:03:41) mjl-: btw, this works without leaving threads: mount <>{mntgen} /tmp; unmount /tmp (19:24:32) powerman: mjl-: hehe. it works without leaving threads because… it doesn't works :) (19:25:18) mjl-: ok ok, add an -A ;) (19:33:35) powerman: mjl-: ok, you can close otherfd using sys->dup(stdin.fd, otherfd); (19:33:58) powerman: still ugly, but without needs to spawn close() at least (19:35:42) mjl-: yeah (19:36:17) mjl-: ideally i would get rid of the fd's entirely (19:36:18) mjl-: i bet there is no close for purity reasons (19:36:18) mjl-: or, to prevent confusion (19:36:27) mjl-: if it exists, people probably think it is required (19:36:30) mjl-: for closing any fd (19:36:46) powerman: in theory tmp:=sys->fildes(otherfd); tmp=nil; should work. (19:37:07) powerman: but I'll be surprised if it really works (19:37:42) powerman: close tied to gc (19:38:00) mjl-: i'm still not 100% sure about fd's, but i think fildes() just adds a new fd to the fd table, with only a single reference. it doesn't do anything with otherfd's number (19:38:30) powerman: yep, but then it should be removed by gc when this _only_ reference is gone (19:39:51) mjl-: yes, the reference to tmp. but tmp was a newly added fd. the original fd doesn't come into play (19:40:49) anth left the room (quit: Quit: anth). (20:26:36) tensai_cirno left the room (quit: Quit: Leaving). (20:40:58) uriel_ is now known as uriel (20:53:15) Fish-- [~Fish@9fans.fr] entered the room. (21:56:59) sl [none@sp.inri.net] entered the room. (22:39:44) mjl-: is anyone here considering applying for gsoc? for plan 9 or inferno (22:53:54) anth [~a@72-160-98-179.dyn.centurytel.net] entered the room. (22:53:57) fgudin [~none@digi00070.digicube.fr] entered the room. (22:56:05) GriffenJBS: mjl-: to be honest I've never looked at gsoc (22:56:32) GriffenJBS: doesn't pay does it? how is it different than joining a group and contributing like so many already do? (23:07:34) mjl-: GriffenJBS: you do get paid (23:07:45) mjl-: i believe it was 5000 dollar over a course of 3 months in 2007 (23:07:50) mjl-: plus, you get a mentor (23:08:17) mjl-: so yes, joining & contributing is good (23:08:37) mjl-: but why not do it organized, with a somewhat clear target, with help & some money (23:08:42) mjl-: ☺ (23:09:25) mjl-: if you're a student, and have some spare time, i would recommend applying for a project (23:09:40) mjl-: hell, if i were registered as a student somewhere, i would apply ☺ (23:12:49) GriffenJBS: I'm not a student (23:12:49) GriffenJBS: so still off limits to me (23:12:49) GriffenJBS: ... is there anything like a telnet/ssh server for inferno (23:12:49) vsrinivas: no. (23:12:49) vsrinivas: part of the idea would be to run inferno on the client too; (23:12:49) GriffenJBS: there is an idea, once you log into that from most any OS, the grid/network is wide open ;-) (23:12:50) GriffenJBS: vsrinivas: that is exactly what I'm trying to keep from doing (23:13:29) GriffenJBS: this laptop is windows, the ssh sessions are linux, and I would like to be able to telnet/ssh in to an inferno box, then I could link all the others together in one session/namespace (23:19:23) GriffenJBS: there is no shell login? (I found one from wm) (23:19:39) mjl-: there is some remote execution thing (23:20:09) mjl-: couldn't tell you which one though (23:24:59) GriffenJBS: someone made a ssh client for inferno, so I wondered if there was a reciprocal (23:25:55) vsrinivas: there's rcpu / rstyx, yea. (23:26:23) mjl-: i've thought about writing an ssh server (23:26:36) mjl-: but there isn't so much use, since there are no terminal apps (23:26:58) mjl-: using inferno's sh from eg an xterm+ssh would probably be painful (23:32:24) Fish-- left the room (quit: Quit: So Long, and Thanks for All the Fish). (23:41:21) jgblanco [~jgblanco@193.153.233.93] entered the room. (23:57:10) jgblanco left the room (quit: Quit: jgblanco). (00:01:30) __20h__ left the room (quit: *.net *.split). (00:01:34) eno left the room (quit: *.net *.split). (00:01:38) jas left the room (quit: *.net *.split). (00:01:40) vsrinivas left the room (quit: *.net *.split). (00:01:47) btdn left the room (quit: *.net *.split). (00:01:50) anth_x left the room (quit: *.net *.split). (00:01:50) Fish- left the room (quit: *.net *.split). (00:01:50) anth_r left the room (quit: *.net *.split). (00:01:51) GriffenJBS left the room (quit: *.net *.split). (00:01:52) vpm left the room (quit: *.net *.split). (00:01:54) perdix left the room (quit: *.net *.split). (00:01:54) sl left the room (quit: *.net *.split). (00:01:54) mycroftiv left the room (quit: *.net *.split). (00:02:35) sl [none@sp.inri.net] entered the room. (00:02:35) perdix [~mkhl@sxemacs/devel/perdix] entered the room. (00:02:35) mycroftiv [~ircguy@h69-128-47-242.mdsnwi.dedicated.static.tds.net] entered the room. (00:02:35) eno [~eno@nslu2-linux/eno] entered the room. (00:02:35) jas [~jas@adsl-69-215-39-41.dsl.chcgil.ameritech.net] entered the room. (00:02:35) vsrinivas [~me@c-68-48-11-23.hsd1.md.comcast.net] entered the room. (00:02:35) anth_r [none@adsl-99-40-132-129.dsl.bcvloh.sbcglobal.net] entered the room. (00:02:35) anth_x [~a@adsl-99-40-132-132.dsl.bcvloh.sbcglobal.net] entered the room. (00:02:35) __20h__ [~some_one@r-36.net] entered the room. (00:02:35) Fish- [~Fish@exo3753.pck.nerim.net] entered the room. (00:02:35) GriffenJBS [~john@adsl-233-213-109.mia.bellsouth.net] entered the room. (00:02:35) btdn [~btdn@138.74.188.207] entered the room. (00:02:35) vpm [~vpm@reverse-94.fdn.fr] entered the room. (02:34:19) mjl-: rough rewrite of wm/run is close to having all its features. tomorrow i'll get it good enough to commit & push. (03:53:32) bugQ [~bug@c-67-171-127-76.hsd1.ut.comcast.net] entered the room. (04:08:00) bugQ left the room (quit: Read error: Operation timed out). (04:15:24) bugQ [~bug@c-67-171-127-76.hsd1.ut.comcast.net] entered the room. (04:24:44) bugQ left the room (quit: Remote host closed the connection). (05:12:42) perdiy [~mkhl@sxemacs/devel/perdix] entered the room. (05:14:17) perdix left the room (quit: Ping timeout: 240 seconds). (06:19:50) mjl- left the room (quit: Read error: Operation timed out). (08:13:30) vsrinivas left the room (quit: Remote host closed the connection). (08:20:55) tensai_cirno [~cirno@194.186.220.185] entered the room. (09:24:39) tensai_cirno left the room (quit: Read error: Connection reset by peer). (09:24:48) tensai_cirno [~cirno@194.186.220.185] entered the room. (09:30:24) tensai_cirno left the room (quit: Ping timeout: 246 seconds). (09:33:33) tensai_cirno [~cirno@194.186.220.185] entered the room. (09:55:56) The account has disconnected and you are no longer in this chat. You will be automatically rejoined in the chat when the account reconnects.