diff options
Diffstat (limited to 'ext/posix_mq/posix_mq.c')
-rw-r--r-- | ext/posix_mq/posix_mq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/posix_mq/posix_mq.c b/ext/posix_mq/posix_mq.c index cb4cacc..05f407d 100644 --- a/ext/posix_mq/posix_mq.c +++ b/ext/posix_mq/posix_mq.c @@ -438,7 +438,11 @@ static VALUE init(int argc, VALUE *argv, VALUE self) mq->des = (mqd_t)xopen(&x); if (mq->des == MQD_INVALID) { - if (errno == ENOMEM || errno == EMFILE || errno == ENFILE) { + switch (errno) { + case ENOMEM: + case EMFILE: + case ENFILE: + case ENOSPC: rb_gc(); mq->des = (mqd_t)xopen(&x); } |