All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: parisc-linux@thepuffingroup.com
Cc: debian-hppa@lists.debian.org
Subject: [parisc-linux] file locking problems?
Date: Sun, 8 Oct 2000 20:00:48 -0700	[thread overview]
Message-ID: <20001008200047.B639@tausq.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

Hi all,

I'm seeing some weird behavior with file locking on my hppa box:

update-passwd (a Debian package) makes a call to lckpwdf. That fails
with an "Invalid argument" message. It looks like lckpwdf internally uses
fcntl() locking, so I tried that and it too fails with an "Invalid
argument" message.  This happens both on nfs and local ext2 fs.
Similar tests with flock() seems to work ok.

Any ideas? This is using dhd's latest glibc build. My testing program is
attached. I've verified that it works on ext2 fs on i386 and SPARC. Over
nfs it does give an error message (No locks available).

The test program I used is attached.

randolph
-- 
   @..@                                         http://www.TauSq.org/
  (----)
 ( >__< )
 ^^ ~~ ^^

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: locktest.c --]
[-- Type: text/x-csrc, Size: 491 bytes --]

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char **argv)
{
        struct flock l;
        int fd;

        if ((fd = open("test.lck", O_CREAT|O_RDWR)) < 0)
        {
                perror("open");
                return -1;
        }
        memset(&l, 0, sizeof(l));
        l.l_type = F_RDLCK;
        if (fcntl(fd, F_SETLK, &l) < 0)
        {
                perror("fcntl");
                return -1;
        }
        close(fd);
        return 0;
}

             reply	other threads:[~2000-10-09  2:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-09  3:00 Randolph Chung [this message]
2000-10-09  3:52 ` [parisc-linux] file locking problems? David Huggins-Daines
2000-10-09  5:53 ` Randolph Chung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001008200047.B639@tausq.org \
    --to=randolph@tausq.org \
    --cc=debian-hppa@lists.debian.org \
    --cc=parisc-linux@thepuffingroup.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.