RANT: There is no way for interprocedural multithread safe mutexes onUnix - Linux

This is a discussion on RANT: There is no way for interprocedural multithread safe mutexes onUnix - Linux ; I love windows it's so much better and well thought out then this unix garbage. Todays lesson was to implement a system with two processes, where one process contains untrusted and maybe buggy user code that can crash at any ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: RANT: There is no way for interprocedural multithread safe mutexes onUnix

  1. RANT: There is no way for interprocedural multithread safe mutexes onUnix

    I love windows it's so much better and well thought out then this unix
    garbage.

    Todays lesson was to implement a system with two processes, where one
    process contains untrusted and maybe buggy user code that can crash at
    any time (in one of its thread). This was why i moved this code into a
    separate process.

    Now i pass data via a queue implemented as shared memory. And of couse
    i need a mutex for this. No problem on windows, there we have a named
    interprocess mutex. Even old MacOS and MacOSX has a named mutex. But
    on Unix/Posix it sucks. It doesn't seem that there is a way to create
    a mutex to sync access to shared memory.

    If i only had a single thread in the process i could use semaphores
    either posix or SysV IPC ones. But they all share the same problem. If
    the process crashs while it holds the mutex locked it's not released.
    No problem on single threaded apps, there i could keep the lock time
    span short enough to avoid a crash but with multithreading it is not
    possible. The other threads can crash at any time.

    I hate it.
    When do the Unix sucker learn that the MS Core API is so much better
    then Unix.

    Yes this is a rant, i don't want to hear a solution like design it
    otherways - i know how to do it and i'm working on it right now. But
    this sucks, it sucks big times. But i'm 100% sure the next freetard is
    on the way to tell me that unix is so much better.

    So the only question left is who sucks more:

    A ****ing freetard with a keyboard and without a clue what he is
    implementing or a cute and dumb political
    female retard from Alaska. This will not be the only time i will vote
    against the VPILF.

  2. Re: RANT: There is no way for interprocedural multithread safe mutexes on Unix

    scholz.lothar@gmail.com writes:

    > I love windows it's so much better and well thought out then this unix
    > garbage.


    I know, I shouldn't feed trolls. All the same, it's really funny to
    see somebody spend this much more energy on a rant than to simply read
    the man page.

  3. Re: RANT: There is no way for interprocedural multithread safe mutexes on Unix

    After takin' a swig o' grog, Joe Pfeiffer belched out
    this bit o' wisdom:

    > scholz.lothar@gmail.com writes:
    >
    >> I love windows it's so much better and well thought out then this unix
    >> garbage.

    >
    > I know, I shouldn't feed trolls. All the same, it's really funny to
    > see somebody spend this much more energy on a rant than to simply read
    > the man page.


    Heh. Looks like Lothar will be flunking yet another class.

    --
    "Catch a wave and you're sitting on top of the world."
    -- The Beach Boys

  4. Re: RANT: There is no way for interprocedural multithread safemutexes on Unix

    On Oct 26, 7:45*am, scholz.lot...@gmail.com wrote:

    > I love windows it's so much better and well thought out then this unix
    > garbage.


    Really?

    > Todays lesson was to implement a system with two processes, where one
    > process contains untrusted and maybe buggy user code that can crash at
    > any time (in one of its thread). This was why i moved this code into a
    > separate process.


    If it can crash at any time, it can also scribble over the shared
    memory without holding the mutex.

    > Now i pass data via a queue implemented as shared memory. And of couse
    > i need a mutex for this. No problem on windows, there we have a named
    > interprocess mutex. Even old MacOS and MacOSX has a named mutex. But
    > on Unix/Posix it sucks. It doesn't seem that there is a way to create
    > a mutex to sync access to shared memory.


    What happens if the untrusted process *hangs* while holding the named
    mutex? Or are you suggesting there's some problem scenario that can
    cause crashed but not hangs? What if the untrusted process, as it
    crashes, scribbles over the shared memory?

    > If i only had a single thread in the process i could use semaphores
    > either posix or SysV IPC ones. But they all share the same problem. If
    > the process crashs while it holds the mutex locked it's not released.


    Which is good. If it was released, you'd have no way to know that
    you're about to operate on potentially-mangled data.

    > I hate it.
    > When do the Unix sucker learn that the MS Core API is so much better
    > then Unix.


    Actually, neither platform provides a simple solution to your stated
    problem because your stated problem is not simple. You just are
    willing to ignore the serious problems with the easy solution on
    Windows.

    There are a lot of good solutions to your problem, but a named mutex
    is only a small part of one possible such solution.

    DS

    PS: Sorry for feeding the trolls.

+ Reply to Thread