summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-04-08 20:11:53 +0200
committerVolker Lendecke <vl@samba.org>2012-04-09 18:04:55 +0200
commiteff36099c12e936a880c9f2e102b9cf8a7166d40 (patch)
tree34fc3d16d4e9199926eebf9dc2b81cd488949577 /source3/modules
parent7da56a1e37f20d1674e2f1208e4b1f3ca1aad380 (diff)
downloadsamba-eff36099c12e936a880c9f2e102b9cf8a7166d40.tar.gz
samba-eff36099c12e936a880c9f2e102b9cf8a7166d40.tar.bz2
samba-eff36099c12e936a880c9f2e102b9cf8a7166d40.zip
s3: Move the aio signal init to the vfs module
On platforms that don't have an RT signal space, signal initialization fails. aio_fork and aio_pthread don't need the signal, so this would block them from running as well.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 915eae67d3..dd5441740a 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2059,6 +2059,10 @@ static int vfswrap_fsetxattr(struct vfs_handle_struct *handle, struct files_stru
static int vfswrap_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
int ret;
+ if (!initialize_async_io_handler()) {
+ errno = ENOSYS;
+ return -1;
+ }
/*
* aio_read must be done as root, because in the glibc aio
* implementation the helper thread needs to be able to send a signal
@@ -2074,6 +2078,10 @@ static int vfswrap_aio_read(struct vfs_handle_struct *handle, struct files_struc
static int vfswrap_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
int ret;
+ if (!initialize_async_io_handler()) {
+ errno = ENOSYS;
+ return -1;
+ }
/*
* aio_write must be done as root, because in the glibc aio
* implementation the helper thread needs to be able to send a signal