1 Reply Latest reply: Jun 26, 2014 3:44 PM by Ivanigorovich-Oracle RSS

    inotify-like service on Solaris

    ONEEYEMAN

      Hi, ALL,

      According to https://blogs.oracle.com/praks/entry/file_events_notification and Solaris File Event Notification | Rants about the Solaris OS  Solaris has its own implementation of the subject.

      Unfortunately it is available starting from version 11.

       

      So my question is: how do I test for the Solaris version in configure and in the code (compile-time/runtime checks)? Since it is in the kernel I presume I don't need to check for its presence...

       

      Thank you.

        • 1. Re: inotify-like service on Solaris
          Ivanigorovich-Oracle

          In general checking versions of platforms is not a reliable method. A feature may be added in a

          dot release or a patch. It's best to always test the presence of the functionality.

           

          FEN is built on top of the event notification system that exists in Solaris10

          so I would suggest a "probe" port_create() with the right FEN parameters and back

          off if the create fails.

           

          One other note. If you intend to have a single binary run on multiple versions

          of Solaris you should compile it on the oldest version you intend to run on,

          e.g. Solaris 10. Executable compiled on a newer OS will as a rule not run on

          older OSes.