monit-dev
[Top][All Lists]
Advanced

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

Re: darwin works with small tweak


From: Martin Pala
Subject: Re: darwin works with small tweak
Date: Thu, 18 Sep 2003 10:54:35 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4

Rick Robino wrote:

On Thu, Sep 18, 2003 at 08:59:11AM +0200, Martin Pala wrote:
Oops - it seems that Darwin (unlike Linux, Solaris, *BSD) doesn't have poll(). We will probably move to select() because of it (i will look on it).

Yeah, I see openbsd has it.  In any case, I wish I hadn't mentioned
this problem.  Seems wrong to drop poll because of one minority
platform.  Darwin is already problematic... maybe this is a sign
that it should be avoided in 4.0.

The libpool wrapper works so I don't see why any mac folks that
really needed monit couldn't just read a note in PLATFORMS telling
them where to get libpoll.  The software itself has installation
instructions in the makefile.  They will then have to add -lpoll
to LIBS in the monit makefile, and maybe even symlink the libpoll
stuff under /usr instead of /usr/local but that is not a big pain.

Alternatively, this particular platform would be ok to make available
as a prebuilt package if there is real concern that folks couldn't
handle the compilation.  The poll items could be installed as part
of the package.  This would work for all macs, not necessarly all
darwin.  You could also pull the libpoll files into monit so you
could handle any platform without a real poll...

Its OK - select() won't hurt (we use it on another places already). One of the goals is of monit is to be as simple as possible and don't depend on libraries. In the case of monit, only one filedescriptor is polled, in which case poll() has no significant advantage over select(). NetBSD and FreeBSD has poll() too and it is commonly supported in most operating system as select replacement (there are more modern techniques then poll, but they are not standardized). It is standardized since POSIX.1-2001 - who knows why Mac don't support it.

Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]