Re: [9fans] rc exec error behaviour

2016-01-31 Thread Sean Hinchee
Will this project (rc-go?) be hosted at a particular bitbucket/hg 
repository for pull requests, etc?


On 01/31/2016 12:58 AM, Skip Tavakkolian wrote:

Sign me up for testing.

On Sat, Jan 30, 2016, 5:16 PM Prof Brucee > wrote:


Any objections to me rewriting rc in go without all known bugs?

On 31/01/2016 3:36 AM, > wrote:

in the rc shell, when one has exec statement and the exec
fails, rc tries to
continue interpreting statements after the exec which fails
with a strange
EOF error because in the process of preparing filedescriptors
for exec,
the very fd thats used to read the script was closed.

burnzez provided an example of this like:

term% rc -c 'exec doesnotexist; echo test'
doesnotexist: './doesnotexist' directory entry not found
test
rc: /rc/lib/rcmain:29: token EOF: syntax error

the manpage does not explicitely specify what should happen
when exec fails.

i did try to have rc open the . script as OCEXEC and that
fixed the
problem, but it wont work for any other redirections and will
have side effects
as the close-on-exec flag is a propery of the channel and not
of the file
descriptor slot. so imagine stuff like . /fd/0...

i think it would me most resonable to just have rc exit with
error status on
failure. are there any objections to this?

--
cinap





Re: [9fans] rc exec error behaviour

2016-01-31 Thread lucio
> i don't believe the offer was made with a straight face.

Hard to tell, with Prof Brucee.  Do you have evidence of the professor
being a go-skeptic?  Like, no syscall-53 in his kernel?  :-)

Lucio.

PS: I know cinap had his qualms about Go, but I have no recent
evidence there, either.

PPS: and for those who care, Richard Miller is contributing a lot of great 
stuff to Go for plan9/arm. And Cherry's linux/mips needs only a nudge for 
plan9/mips. Yoh! I sound like a Go televangelist!




Re: [9fans] rc exec error behaviour

2016-01-31 Thread erik quanstrom
On Sun Jan 31 16:56:19 PST 2016, henesy@gmail.com wrote:

> Will this project (rc-go?) be hosted at a particular bitbucket/hg 
> repository for pull requests, etc?
> 
> On 01/31/2016 12:58 AM, Skip Tavakkolian wrote:
> > Sign me up for testing.
> >
> > On Sat, Jan 30, 2016, 5:16 PM Prof Brucee  > > wrote:
> >
> > Any objections to me rewriting rc in go without all known bugs?

i don't believe the offer was made with a straight face.

- erik