|Subject:||RE : Re: error and program_name|
|Date:||Thu, 23 Dec 2010 09:01:29 +0100|
If chdir is a problem, why not using a heavy weight approach (better safe than sorry particularly if gnulib is used for a lot of project):
- fork and exec an helper for name resolution
- pass fd using a socket
It is really heavy but it is on the safe side
Le 23 déc. 2010 03:12, "Paul Eggert" <address@hidden> a écrit :
On 12/22/2010 03:32 PM, Bruno Haible wrote:Hmm, well, no, the fchdir could also fail if the directory is
> For example, if save_cwd called
> currdir_fd = open ...
on a remote file system and the network is down. Or
if there is an I/O error (errno == EIO). Or if search
permission is absent from the directory, assuming the
usual case where the directory was opened with O_RDONLY.
There are probably other reasons.
One workaround would be to wrap every system call
that resolves file names, so that all of these system calls
fail if given a relative file name after the fchdir failed.
But that sounds pretty drastic.
|[Prev in Thread]||Current Thread||[Next in Thread]|