Results 1 to 3 of 3

Thread: Can I break the rules for POSIX locks

  1. #1
    TaraMc
    Guest

    Can I break the rules for POSIX locks

    Thanks JimH, your advice made me do some extra reading and I discovered that you cannot create a write lock while a read lock is in place for the same area of the file. This does leave me with a troublesome situation however. I am trying to allow multiple users access to a file, i think it is inefficent to establish a read/write situation if all a client wants to do is view that file, so if a second client than wants to write to that file how do i go about this (i have an inkling that it might be semaphors but i was just wondering if it was possible to break the rules instead ) cheers!

  2. #2

    Re:Can I break the rules for POSIX locks

    I am not entirely sure of what your talking about, but I think what your wanting is forking. This allows for multiple copies of the same program to be running and accessing files at the same time. I have a feeling this is what your talking about.

    Aragorn
    If you give a man a fire he'll be warm, if you light the man on fire he'll be warm for life.

  3. #3
    Stuka
    Guest

    Re:Can I break the rules for POSIX locks

    Not sure if it's implemented in the current version of the pthread library on Linux, but there are read/write locks available there - pthread_rwlock_init() might be a good place to start looking.

Similar Threads

  1. Problem with POSIX semaphores
    By wej@wejc.com in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 12-15-2007, 01:46 AM
  2. Cut me a break!
    By tolstoy in forum General Chat
    Replies: 8
    Last Post: 04-06-2004, 03:10 PM
  3. Drive Locks
    By stodgel in forum Mandriva
    Replies: 6
    Last Post: 04-04-2003, 06:52 PM
  4. System locks up at P.O.S.T.
    By Rastar in forum Linux - Hardware, Networking & Security
    Replies: 6
    Last Post: 10-16-2002, 05:11 PM
  5. POSIX shell
    By luigi in forum Linux - Software, Applications & Programming
    Replies: 5
    Last Post: 05-11-2002, 04:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •