apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: Crash in apr_file_close() (Linux)
Date Fri, 16 Oct 2009 09:17:17 GMT
On 16/10/09 11:01, Joe Orton wrote:
>
> I think the reporter meant "fail" when they said "crash".
>

Dunno what he meant but I confirmed last week's almost exact
report that crashes (really) windows.

> I don't see any reason why it would crash on Unix: the first call to
> apr_file_close() will set fd->filedes to -1 after calling close(), the
> second one will call close(-1) and fail with EBADF.
>

each invocation to apr_file_open_stdout creates a new apr_file_t so
each fd->filedes has a value of STDOUT_FILENO.
This is the same as calling:
close(1);
close(1);

This cores on Windows with latest MSVCRT, so it might crash
some Unix versions as well?

Regards
-- 
^TM


Mime
View raw message