Re: strange NFS problems (ARM client, x86 server)

From: Lennert Buytenhek
Date: Thu Sep 30 2004 - 03:33:50 EST


On Wed, Sep 29, 2004 at 10:33:47PM +0200, Tonnerre wrote:

> Salut,

Hi,


> > chdir("") = -1 ENOENT (No such file or directory)
>
> Interestingly, rpm requested an empty chdir. This narrows down the
> problem.

I don't think it does, as the second invocation of RPM (after cd 'pwd')
also does this, but works fine.


> The following miniapp should be able to reproduce the problem:
>
> cat << EOT > blah.c
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
>
> int main(void) {
> if (chdir("")) {
> perror("chdir");
> exit(1);
> }
> exit(0);
> }
> EOT

'current directory' is per-process state. You'll end up changing the
current directory in the child process, but not the parent.


--L
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/