in reply to Re^3: Why does fpathconf give "bad file descriptor"?
in thread Why does fpathconf give "bad file descriptor"?
Looking at the code for fpathconf in glibc, I see that, for 16 of the 21 configuration parameters, fd is ignored—except to check that it is >= 0. So I think what's happening is that when the objects are being allocated above (void *)((unsigned int)-1 >> 1), when it's passed as an int, it's negative, so it gives an error.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Why does fpathconf give "bad file descriptor"?
by ikegami (Patriarch) on Mar 31, 2010 at 22:05 UTC | |
by madscientist (Novice) on Apr 01, 2010 at 01:56 UTC |