[Stackless] [Fwd: Re: Stackless crash]

Ronald Oussoren oussoren at cistron.nl
Fri Mar 12 18:55:45 CET 2004


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



More information about the Stackless mailing list