Dave Dykstra wrote:

> You shouldn't have to have it be in the foreground in order for strace -f

You're right, I was not aware of that option.  And I thought I
knew my way around strace.

Here's what strace shows me:

[pid 14576] open("/tmp/rsyncd.lock", O_RDWR|O_CREAT|0x8000, 0600) = 4
[pid 14576] fcntl(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0

But the source looks just right:

connection.c[39,42]:
        /* find a free spot */
        for (i=0;i<max_connections;i++) {
                if (lock_range(fd, i*4, 4)) return 1;
        }

util.c[494,506]:
/* lock a byte range in a open file */
int lock_range(int fd, int offset, int len)
{
        struct flock lock;

        lock.l_type = F_WRLCK;
        lock.l_whence = SEEK_SET;
        lock.l_start = offset;
        lock.l_len = len;
        lock.l_pid = 0;

        return fcntl(fd,F_SETLK,&lock) == 0;
}

I guess maybe there's a library issue involved.  But why it would
stomp on a structure element is unclear.  I'm putting together a
couple new systems with Slackware 8.0 which has glibc 2.2.3 so
I'll probably just first try it on there and see if the problme
persists or not.

-- 
-----------------------------------------------------------------
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
-----------------------------------------------------------------

Reply via email to