[9fans] plan9port and procexecl
Hi, I have a piece of code which compiles and works fine in Plan9: void execproc(void *v) { Channel *sync; Exec *e; int q[2]; char *cmd; threadsetname(execproc); e = v; q[0] = e-q[0]; q[1] = e-q[1]; cmd = e-cmd; sync = e-sync; rfork(RFFDG); free(e); if(q[0]){ dup(q[1], 1); close(q[0]); close(q[1]); } procexecl(sync, /bin/rc, rc, -c, cmd, 0); sysfatal(can't exec); } (partly stolen from abaco, it runs a command in a proc and pipes the output). In plan9port the compiler complains for undefined procexecl, and the linker fails. What would be the closest analog of procexecl for plan9port? Thanks.
Re: [9fans] breadth first walking
what's a scape tree? 2010/1/4 Bruce Ellis bruce.el...@gmail.com: yep, use a scape tree. ozi is full of them. no hash tables here, except for my coffee table. brucee On 1/4/10, Tim Newsham news...@lava.net wrote: someone mentioned in the thread that it would be nice to be able to walk directory trees in breadth-first manner: http://www.thenewsh.com/~newsham/x/9/walk.c Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com
Re: [9fans] breadth first walking
2010/1/4 Tim Newsham news...@lava.net: someone mentioned in the thread that it would be nice to be able to walk directory trees in breadth-first manner: http://www.thenewsh.com/~newsham/x/9/walk.c that's potentially useful, thanks. BTW, any robust file tree walker in plan 9 should cope with cycles in the tree. maybe just a linear list of parents with refcounted nodes might work best for this implementation. something like the attached modification to walk.c, perhaps? walk.c should also eliminate duplicate entries from union mounts - either by sorting the directory entries or using a little hash table of names for each directory. or... use a scape tree? walk.c Description: Binary data
Re: [9fans] breadth first walking
you were talking and not listening. On 1/4/10, roger peppe rogpe...@gmail.com wrote: what's a scape tree? 2010/1/4 Bruce Ellis bruce.el...@gmail.com: yep, use a scape tree. ozi is full of them. no hash tables here, except for my coffee table. brucee On 1/4/10, Tim Newsham news...@lava.net wrote: someone mentioned in the thread that it would be nice to be able to walk directory trees in breadth-first manner: http://www.thenewsh.com/~newsham/x/9/walk.c Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com
Re: [9fans] evoluent mouse review
On Sun, Jan 3, 2010 at 8:41 PM, Russ Cox r...@swtch.com wrote: On Sun, Jan 3, 2010 at 1:52 PM, Mathieu Lonjaret mathieu.lonja...@gmail.com wrote: I'm thinking of buying such a mouse. Have you found better since you posted that review? Did you (or anyone else) get a chance to eventually try the wireless one? I still use Evoluents everywhere, all wired, with both Linux and OS X. The software remapping is still the only real pain point. On OS X, I use a third-party program called USB Overdrive. On Linux, after each installation of new X software I have to run xev to learn what button numbers X assigns by default and then construct a new xmodmap line for the funnymouse script. I haven't found a better mouse, nor have I tried the wireless one. I am planning to play with an Apple Magic Mouse using Paul Lalonde's patch (soon to be in p9p). Interesting. :-) I've used the Apple Magic Mouse, and it's ok. I was at an apple store when I did. I've got some code that can read touchpads (I think I've tracked up to 10 points). If the mouse has the same raw capabilities as the touch pad, it might be a good Plan 9 chording mouse. I just worry what happens when your palm is down or not on the mouse. I've actually become a trackball guy again, and use the Kensington Expert Mouse Trackball. http://www.amazon.com/Kensington-Expert-Optical-Trackball-64325/dp/B9KH63/ref=sr_1_1?ie=UTF8s=electronicsqid=1262621445sr=8-1 I paid 100 USD for mine, and have no regrets. It's got 4 buttons and can chord just fine. The scroll ring is pretty nice too. There's a newer version but I think they may have taken a step backwards. Dave Russ
Re: [9fans] evoluent mouse review
Just saw this Patch of Paul's, it's the same stuff I found. I'm now anxious to try the new p9p on my touchpad with the macbook! :-) Good times! Thanks Paul and Russ! Dave On Mon, Jan 4, 2010 at 10:14 AM, Anthony Sorace a...@9srv.net wrote: Benjamin Huntsman wrote: Anyone remember or still use the Depraz red mouse? I thought I had heard someone figured out how to convert them to USB... I've got two of the USBified ones, one attached to my cpu server and one moving between an old iBook and a few other Plan 9 machines. i still really like the feel in my hand and the resistance on the buttons, although optical is a real step forward. the little plastic nubs on the bottom could be smoother, too. these were USBified while i was at the labs; i have no information on the procedure.
Re: [9fans] secstore account expired, how fix it using only drawterm
cpu% auth/secstore -g factotum secstore password: auth/secstore: error: account rtr expired at Sat Jan 2 03:59:59 GMT 2010 secstore password: see secstore(8). auth/secuser $user is what you want. on the console of the auth server. - erik
Re: [9fans] secstore account expired, how fix it using only drawterm
Thank you Erik. On Mon, Jan 4, 2010 at 7:09 PM, erik quanstrom quans...@coraid.com wrote: cpu% auth/secstore -g factotum secstore password: auth/secstore: error: account rtr expired at Sat Jan 2 03:59:59 GMT 2010 secstore password: see secstore(8). auth/secuser $user is what you want. on the console of the auth server. I managed to log in as bootes with drawterm and then went and edited /adm/secstore/who/$user by hand to give it a new expiration epoch value. I'm not sure why the auth commands hang in a vanilla drawterm (no rio). I get the impression that setting the console to raw doesn't work with drawterm, but I lack skill and time to figure that one out just now. All sorted now anyway, thanks again, Robby
[9fans] secuser bugs
i submitted a patch to secuser. i noticed that the month printed was off by one. according to secuser one year from today would be (in the odd ddmmy format it used) 04002011. i changed that to mmdd and fixed a handful of bugs. one year from today is now 20110104. - erik
Re: [9fans] secstore account expired, how fix it using only drawterm
I'm not sure why the auth commands hang in a vanilla drawterm (no rio). The problem is not drawterm, it is by design. keyfs (and I assume secstored) create a virtual filesystem that the command line apps use to communicate with the running daemon. Due to plan9's per process namespace and because your drawterm session is not decended from the console's shell (where /mnt/keys was created) you cannot see the control file and so you cannot perform key administration. There are some neat tricks you can do if you have a remote server - the approved way is to run a console server program on another machine and wire up the EIA interfaces so you can use the serial console. Erik has an ethernet (not tcpip, raw ethernet) console kernel driver and command line tool which is easier these days (EIA interfaces are a dieing breed). You can even use these tools over a loopback interface, from the machine back to itself. another possibility is to serve the consoles view of /mnt and post it as a file descriptor in /srv with read/write for only bootes - people have posted such solutions on 9fans in the past. I get the impression that setting the console to raw doesn't work with drawterm. I would be very surprised if this is the case, I don't use drawterm much but last time I tried it raw/cooked worked fine. All sorted now anyway Good -Steve
Re: [9fans] secuser bugs
On Mon Jan 4 16:23:56 EST 2010, st...@quintile.net wrote: (in the odd ddmmy format it used) We, on this side of the pond, find that format rather modern and exciting; not in the least bit old... ☺ i suppose that it has the benefit that it conflicts with the fileserver's dump format. plus it sorts incorrectly. - erik
Re: [9fans] secstore account expired, how fix it using only drawterm
Erik has an ethernet (not tcpip, raw ethernet) console kernel driver and command line tool which is easier these days (EIA interfaces are a dieing breed). You can even use these tools over a loopback interface, from the machine back to itself. a version of cec(8), the client, is available in the distribution. also, a better-for-debugging version is available as contrib quanstro/cec. see the -e flag. cec(3), the server, is available in 9atom. i've been using cec heavily recently as i've been working on a driver and have been too lazy to hook up serial. - erik