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:10:30 +0000 (17:10 -0400)
commitac64486f90113974c2c7377fb097293bb1adad1b
treef7b522831c0cbbcf1947ad589082e4483caff5ee
parent8c82e2da6b17493d879523b80aed11d0d250eef1
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.024509 seconds and 4 git commands to generate.