[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] nextfd(2)
    On 04/11/2012 12:46 PM, KOSAKI Motohiro wrote:
    >> a) inherently racy in a multithreaded environment;
    > I would say two things. 1) I know and I agree we _can_ misuse the interface.
    > but many already existed interface also can be misused. 2) As I
    > already explained
    > this can be used correctly.
    > So, I have a question. Why do you bother a possibility of misuse? Of
    > if you didn't point out misuse, can you please point out a real world
    > use case of multi threads + fd interation?

    This were brought up in the POSIX discussion as part of why these
    interfaces were considered undesirable.

    >> b) unsafe because there might be file descriptors used by libc itself.
    > I agree this. Even though almost developer don't use libc message catalogue and
    > we can avoid such issue by using nextfd() + fcntl(O_CLOEXEC).

    No, that's exactly the point that we cannot.

    > Yeah, I don't think fdwalk() is problematic. It's an option if I
    > understand Alexey's mail
    > correctly. but I disagree almost all developers should fix a design
    > and rewrite their
    > applications. In theory, they can avoid glibc or they can rewrite all
    > of their code or
    > avoid linux. but there is one problem. unrealistic.

    The problem -- as was brought up in the POSIX discussion -- is that you
    actually end up breaking *properly functioning programs*.


     \ /
      Last update: 2012-04-11 21:51    [W:0.019 / U:84.616 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site