X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=libust%2Frelay.c;h=3259adee432da29fb1b063605b1d7bab01be3255;hb=68ab7a5d576faa16e0da19d0f824785eac215ae9;hp=05399b4a75787acb512eb30e09d6a721f80526a8;hpb=08230db7e2e536bddf0015fa663b6d10abea30f1;p=lttng-ust.git diff --git a/libust/relay.c b/libust/relay.c index 05399b4a..3259adee 100644 --- a/libust/relay.c +++ b/libust/relay.c @@ -101,7 +101,11 @@ static int relay_alloc_buf(struct rchan_buf *buf, size_t *size) *size = PAGE_ALIGN(*size); result = buf->shmid = shmget(getpid(), *size, IPC_CREAT | IPC_EXCL | 0700); - if(buf->shmid == -1) { + if(result == -1 && errno == EINVAL) { + ERR("shmget() returned EINVAL; maybe /proc/sys/kernel/shmmax should be increased."); + return -1; + } + else if(result == -1) { PERROR("shmget"); return -1; }