lkml.org 
[lkml]   [2007]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 7/8] fdmap v2 - implement sys_socket2
    > > and there's absolutely nothing wrong with this kind of setup, even if you 
    > > could obviously have done it other ways too (ie by using "dup2()" instead
    > > of "close + open"),
    > >
    >
    > This kind of setup was OK 25 years ago, before multithreading era.
    > You cannot reasonably expect it to work in a multithreaded program.

    Why not.

    When execution begins which is the normal point you do this then you've
    got one thread. If you need to do this from a thread after that point
    posix provides threaded applications with locking.

    Not much else works in a threaded app if you get the locking wrong, and
    that is considered the authors job. Why is fd allocation different ?
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-06-10 17:15    [W:2.709 / U:0.524 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site