[clean-list] freopen fails
Arjen van Weelden
A.vanWeelden at cs.ru.nl
Wed Jan 31 09:57:40 MET 2007
Finally, I can get freopen to fail. It only fails if I use the Object
I/O file selector and select a file from a different directory (not the
project directory).
It looks like the file selector changes the current working directory,
which makes freopen fail. Obviously a bug in the implementation of
freopen. Thank you for reporting this.
kind regards,
Arjen
Erik Zuurbier wrote:
>
> Dear Cleaners,
>
> I have a case where freopen fails. The comments in the StdFile library say:
>
> freopen :: !*File !Int -> (!Bool,!*File)
> /* Re-opens an open file in a possibly different mode.
> The boolean indicates whether the file was successfully closed before
> reopening. */
> So I look at fclose:
>
> fclose :: !*File !*f -> (!Bool,!*f)
> /* Closes a file */
> I can imagine that closing fails if I remove a file by hand in the mean
> time, but that is not the case in my program.
> What could be the other conditions under which closing a file fails?
>
> Regards Erik Zuurbier
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> clean-list mailing list
> clean-list at science.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/clean-list
More information about the clean-list
mailing list