Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/crypto/dist/ipsec-tools

On Tue, Dec 30, 2008 at 04:43:37PM +0000, Christos Zoulas wrote:
> In article <>,
> Timo Teräs <> wrote:
> >
> >Module Name: src
> >Committed By:        tteras
> >Date:                Tue Dec 30 15:50:25 UTC 2008
> >
> >Modified Files:
> >     src/crypto/dist/ipsec-tools: ChangeLog
> >     src/crypto/dist/ipsec-tools/src/racoon: session.c
> >
> >Log Message:
> >schedular() call can now modify fd mask so make the working copy just
> >before calling select(); otherwise it can contain bad file descriptors
> >
> >
> >To generate a diff of this commit:
> >cvs rdiff -r1.208 -r1.209 src/crypto/dist/ipsec-tools/ChangeLog
> >cvs rdiff -r1.21 -r1.22 src/crypto/dist/ipsec-tools/src/racoon/session.c
> >
> >Please note that diffs are not public domain; they are subject to the
> >copyright notices on the relevant files.
> Can make the code use poll instead? Are there any systems that
> ipsec-tools is ported to that don't have poll? And even for those,
> there is poll emulation.

I agree with Christos about the benefits of poll over select, but
beware - Mac OS X's poll is special - it can't handle devices,
although its select can.

This includes the marvellously weaselly:

        For example, in Mac OS X, poll(2) does not support device files such
        as /dev/tty.  If you just avoid poll if your code is running on Mac OS
        X, you are making two assumptions that you should not make:

            * You are assuming that what you are doing will always be
              unsupported.  Mac OS X is an evolving operating system that adds
              new features on a regular basis, so this is not necessarily a
              valid assumption.

            * You are assuming that Mac OS X is the only platform that does
              not support using poll on device files.  While this is probably
              true for most device files, not all device files support poll in
              all operating systems, so this is also not necessarily a valid

The word "sorry" wouldn't have gone amiss here.


Home | Main Index | Thread Index | Old Index