aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts/scripts_parallel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/scripts/scripts_parallel.c')
-rw-r--r--src/bin/scripts/scripts_parallel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/scripts/scripts_parallel.c b/src/bin/scripts/scripts_parallel.c
index ffdc4e49ef8..10379a1f99b 100644
--- a/src/bin/scripts/scripts_parallel.c
+++ b/src/bin/scripts/scripts_parallel.c
@@ -95,6 +95,20 @@ select_loop(int maxFd, fd_set *workerset, bool *aborting)
}
/*
+ * ParallelSlotsMax
+ * Returns the maximum number of parallel slots supported.
+ *
+ * Note that this is included here as FD_SETSIZE is declared in sys/select.h
+ * per POSIX.
+ */
+int
+ParallelSlotsMax(void)
+{
+ /* leave some room for pre-existing fds */
+ return FD_SETSIZE - 10;
+}
+
+/*
* ParallelSlotsGetIdle
* Return a connection slot that is ready to execute a command.
*