[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libdb2 problem?

dbopoen() with O_CREAT|O_RDWR fails with EPERM as root.  I've checked
the parameters in gdb hacked around with it a bit, and want to check
here before investigating libdb2 itself.  Any known problems (maybe with
file locking and the Hurd?)

I'm porting RPM to the Hurd, mostly just to waste time (though I prefer
RPM to dpkg).  rpm --initdb fails, although I can rebuild RPMS, sign
them, etc.  rpm --initdb seems to correctly create the first index
`/lib/rpm/packages.rpm', then fails on the second
`/lib/rpm/nameindex.rpm'.  If I re-run it, it creates a zero byte file
for the second, and fails on the third.  Then it will create a zero byte
file for the third and fail on the fourth, and so fourth.  This is why I
suspect some sort of locking issue with the Hurd.

-Jay 'Eraserhead' Felice

P.S.  Is there a `Pitfalls with Porting to the Hurd' document
somewhere?  If so, add that Linux-specific code may assume that (O_RDWR
& O_WRONLY) == 0, and that on hurd O_RDWR = (O_WRONLY|O_RDONLY).  The
correct fix is to use (mode & O_ACCMODE) == O_WRONLY.  Okay, that's not
very clear, but I hope you get what I mean.  Very subtle and difficult
to debug.

Reply to: