Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread erik quanstrom
On Mon Oct 31 18:34:50 EDT 2011, cinap_len...@gmx.de wrote: > problem is that the flags are per channel, not per filedescriptor. that's not due to treaty or edict. one would need to make a distinction between synthetic flags like OCEXEC and flags that are negotiated through open(1) like OREAD -

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread erik quanstrom
On Mon Oct 31 18:39:19 EDT 2011, rminn...@gmail.com wrote: > well, I could be really lazy. I think this would work. > > given an fd, say 6 > newfd = open('#d/6", OREXEC|permissions) > close(fd) > then dup the newfd. The newfd will close when you leave. > > Problem: what are the permissions for th

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread cinap_lenrek
for 9front page, i wrote a function that implements inferno style pctl filedescriptor passing. basicly, you fork and then give it a list of filedescriptors you want in the process like: dupfds(foofd, 1, 2, -1);// redirect foofd to stdin of this process, keep stdout/stderr all the other f

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
well, I could be really lazy. I think this would work. given an fd, say 6 newfd = open('#d/6", OREXEC|permissions) close(fd) then dup the newfd. The newfd will close when you leave. Problem: what are the permissions for the old fd ... ron

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread Bakul Shah
On Mon, 31 Oct 2011 15:17:39 PDT ron minnich wrote: > > I did the lazy thing and commented out the erroneous close for now. > The easy fix is to track the fds to be closed in a map and then close > them all later. That's next. Another possibility is to allow '#d/*ctl' > to be writeable and imple

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread cinap_lenrek
problem is that the flags are per channel, not per filedescriptor. -- cinap

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread erik quanstrom
> OK, now, the current problem with syscall/exec_plan9.go is that it is > a little too eager to close FDs. It's doing the close by hand because > it's not possible on Plan 9 to take an fd and set to to close-on-exec > -- that's only done on open on Plan 9 (on unix the code does an > fcntl). But if

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
On Mon, Oct 31, 2011 at 3:10 PM, Skip Tavakkolian wrote: > awesome job!  compiled fine. i'm running godoc and now rewriting some > cgi's in go. many thanks to everyone  involved. Keep us posted on any problems you hit. Also, if you want to track tip, I just did a pull.I just committed more fixes

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
On Mon, Oct 31, 2011 at 3:10 PM, Skip Tavakkolian wrote: > awesome job!  compiled fine. i'm running godoc and now rewriting some > cgi's in go. many thanks to everyone  involved. OK, now, the current problem with syscall/exec_plan9.go is that it is a little too eager to close FDs. It's doing the

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread Skip Tavakkolian
awesome job! compiled fine. i'm running godoc and now rewriting some cgi's in go. many thanks to everyone involved. -Skip On Mon, Oct 31, 2011 at 2:01 PM, ron minnich wrote: > btw, I just moved us up to tip Lyndon found out how to kill the cpp errors. > > Builds fine, go programs (some of the

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
btw, I just moved us up to tip Lyndon found out how to kill the cpp errors. Builds fine, go programs (some of them) run fine. If anybody wants to work out why pkgt/syscall/exec_plan9.go is closing fd 6 twice when goinstall tries to fire off the mk command, would be good to know. ron

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
On Mon, Oct 31, 2011 at 12:44 PM, Stanley Lieber wrote: > On Mon, Oct 31, 2011 at 2:32 PM, ron minnich wrote: >> Would be interesting if, from 9front, you could: >> 9fs sources >> bind /n/sources/plan9/386/bin/8c /bin/8c >> >> and see if it breaks. >> >> ron > > Exact same result. hmm, interesti

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread Stanley Lieber
On Mon, Oct 31, 2011 at 2:32 PM, ron minnich wrote: > Would be interesting if, from 9front, you could: > 9fs sources > bind /n/sources/plan9/386/bin/8c /bin/8c > > and see if it breaks. > > ron Exact same result. -sl

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
Would be interesting if, from 9front, you could: 9fs sources bind /n/sources/plan9/386/bin/8c /bin/8c and see if it breaks. ron

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread Stanley Lieber
On Mon, Oct 31, 2011 at 12:50 PM, ron minnich wrote: > On Mon, Oct 31, 2011 at 10:45 AM, Stanley Lieber > wrote: >> On Mon, Oct 31, 2011 at 12:41 PM, andrey mirtchovski >>> i'm not seeing this in either 9vx or a plan9 vm... what are compiling on? >> >> 9front in vmware. > > ah, not something I ca

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
On Mon, Oct 31, 2011 at 10:45 AM, Stanley Lieber wrote: > On Mon, Oct 31, 2011 at 12:41 PM, andrey mirtchovski > wrote: >>> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c >>> 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a >>> mk: /386/bin/go/8c -Iplan9 -I3

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread Stanley Lieber
On Mon, Oct 31, 2011 at 12:41 PM, andrey mirtchovski wrote: >> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c >> 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a >> mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781: >> sys: trap: fault writ

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
On Mon, Oct 31, 2011 at 10:41 AM, andrey mirtchovski wrote: >> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c >> 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a >> mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781: >> sys: trap: fault writ

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread andrey mirtchovski
> /386/bin/go/8c -Iplan9 -I386 -Iplan9/386 -I . amd64/traceback.c > 8c 5781: suicide: sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a > mk: /386/bin/go/8c -Iplan9 -I386 ...  : exit status=rc 5779: 8c 5781: > sys: trap: fault write addr=0x3007ebf4 pc=0x00015e5a i'm not seeing this in either 9v

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread Stanley Lieber
On Mon, Oct 31, 2011 at 12:08 PM, ron minnich wrote: > you forgot to > cd /go/src > . 9setup So did the instructions. :) piro% cat 9setup GOARCH=386 GOOS=plan9 GOVERSION=60.2 GOROOT=/go piro% . 9setup piro% mk install cmd cc ar vu cc.a8 y.tab.8 lex.8 mac.8 dcl.8 acid.8 godefs.8 bits.8 com.8 scon

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
you forgot to cd /go/src . 9setup On Mon, Oct 31, 2011 at 9:41 AM, Stanley Lieber wrote: > On Mon, Oct 31, 2011 at 10:11 AM, ron minnich wrote: > > [snip] > >> You can try it. > > Thanks, Ron. > > I ran into some problems: > > piro% cd > piro% ls > acme.dump > bin > books > dump > go > gout > i

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread andrey mirtchovski
did edit and run '. 9setup'?

Re: [9fans] native (mostly) go for plan9

2011-10-31 Thread Stanley Lieber
On Mon, Oct 31, 2011 at 10:11 AM, ron minnich wrote: [snip] > You can try it. Thanks, Ron. I ran into some problems: piro% cd piro% ls acme.dump bin books dump go gout img lib mkfile paint tmp piro% bind -ac . / piro% cd /go piro% cd 9/prebuilt piro% rc install piro% cd /go/src piro% mk insta

[9fans] native (mostly) go for plan9

2011-10-31 Thread ron minnich
A number of us have been working on a native Go port for plan 9. The big goal is to do this in a way that makes tracking Go source a non-problem, and to eventually just have these changes part of the standard Go tree, so there is no work at all. we're pretty close, thanks to previous work others

[9fans] 9vx Lion binary ?

2011-10-31 Thread prem
Hello all, Does anyone has latest binary that works on Lion ? I get "9vx panic: pasteboard create" - Prem