diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-02-27 10:11:34 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-02-27 11:02:45 +0000 |
commit | 8595f845b3903907adaa614443a582179e5da22a (patch) | |
tree | da522147af52c4230263272eb2decd3155a7f93f /ext/posix_mq/posix_mq.c | |
parent | b4a8788ea8768574dd7a5d109bff8ece072d3873 (diff) | |
download | ruby_posix_mq-8595f845b3903907adaa614443a582179e5da22a.tar.gz |
It could work...
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); } |