Fix: don't SIGBUS when filesystem is full
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 May 2012 21:07:06 +0000 (17:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 May 2012 21:07:06 +0000 (17:07 -0400)
commit3a81f31dfe668b3c56207745ca698c7db4dc0890
treef1fe52c9c26040b6a6f80bc4573a46a41f43ab34
parent33661f97563de83b20ccda88789741976d49b8cd
Fix: don't SIGBUS when filesystem is full

Write zeroes into the buffer after its allocation to ensure that writes
to the shm will not trigger SIGBUS upon full filesystem situations.

This scenario can occur if /dev/shm is filled, e.g. by specifying too
large buffers with --enable-channel.

When the write() fails, the buffer creation for this channel fails.

Fixes #230

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/shm.c
This page took 0.024965 seconds and 4 git commands to generate.