[Stackless] [Fwd: Re: Stackless crash]

Seung Chan Lim slim at maya.com
Tue Mar 23 21:15:52 CET 2004


yeah, that code was left in wrong because the crash was happening on a
windows machine in an environment where os.name would never be "posix", so
that has nothing to do with the crash :)

anybody figure out why the code crashes?

slim

>
> On 12-mrt-04, at 11:51, Bob Ippolito wrote:
>
> > At first inspection, lines 534-536 are not correct:
> >             if os.name == "posix":
> >                 fd = os.open(path, os.O_NONBLOCK)
> >                 fo = os.fdopen(fd, mode)
> >
> > This code expects to create a file, but you can't os.open a file path
> > that doesn't exist.
>
> You can, but have to specify os.O_CREAT. The code above also doesn't
> specify the open mode.
>
> This should be something like 'fd = os.open(path,
> os.O_CREAT|os.O_NONBLOCK|os.O_RDWR, 0666)'
>
> Ronald
>
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>
>


_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list