[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: freopen (was: Re: LYNX-DEV 4DOS)
From: |
Laura Eaves |
Subject: |
Re: freopen (was: Re: LYNX-DEV 4DOS) |
Date: |
Thu, 8 May 1997 04:35:15 -0400 (EDT) |
> Date: Wed, 7 May 1997 23:41:51 -0400 (EDT)
> From: ELCHONON EDELSON <address@hidden>
>...
> You would probably want to check for permission to write to the
> specified file, so you don't lose your stderr if the open fails.
> I I recall correctly, freopen will close the given descriptor
> before attempting the open, so if the open fails you've lost
> your stderr and any code that writes to it (such as all the debugging
> you have scattered through the whole source base) will cause
> a possibly fatal error.
Ok, there is one correction ot the program I sent in my previous mail...
The parent directory needs to be both writable and executable.
Change the following lines:
...
printf(" - checking parent directory %s\n",dir);
if ( access(dir,W_OK|X_OK) == -1 ) ok = 0;
if ( !ok )
printf(" - parent dir does not exist or is not writable and
executable\n");
...
--le
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;