Peter Baumgarten, le Fri 14 Mar 2014 22:33:42 -0500, a écrit : > On Tue, 2014-03-11 at 10:15 +0100, Samuel Thibault wrote: > > Another way is to just fix lockf in glibc (for now it is just returning > > ENOSYS), it seems sudo simply locks the whole file, so it would be the > > simple case to implement. > > If I did want to fix lockf in glibc where would I find the lockf > function to fix it and what should it look like or do when it is > working?
I have already told you that: “ The second part would be fixing lockf in glibc in the simple case used by sudo, which is locking the whole file. It should be a matter of calling some lseek() inside fcntl() in glibc/sysdeps/mach/hurd/fcntl.c and check whether it happens to be 0, instead of just returning errno=ENOTSUP in the SEEK_CUR case. ” (the lockf function itself is in glibc/io/lockf.c) Samuel