Fix mq.notify = nil to unregister notifications
commit6f24b5626f89fbb6445c0943ba71f56c8945e18f
authorEric Wong <normalperson@yhbt.net>
Sun, 3 Jan 2010 04:41:39 +0000 (2 20:41 -0800)
committerEric Wong <normalperson@yhbt.net>
Sun, 3 Jan 2010 04:57:54 +0000 (2 20:57 -0800)
tree62a739ddbb2a792a4864f7e5f7c97368e816d30e
parent522d4d1472c216bd95a16ca5b118bc14693aad64
Fix mq.notify = nil to unregister notifications

"mq.notify = false" also works now, doing what
"mq.notify = nil" used to do (using SIGEV_NONE).

I was confused by SIGEV_NONE usage vs using a NULL pointer for
the notification passed mq_notify(3).  SIGEV_NONE does not
actually unregister, it registers a no-op notification which
prevents other processes from taking us.

This also fixes the test case to pass under both Linux and
FreeBSD.
ext/posix_mq/posix_mq.c
test/test_posix_mq.rb