This describes better what the function does; it initializes the
entire jobcontrol into functional state. That is more than setting the
number of maximum jobs.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
rrdtool_create_missing_databases(all_rrds);
- init_max_jobs(opts.max_jobs);
+ init_jobcontrol(opts.max_jobs);
while (1) {
pr_info("loop start\n");
* Initialize the jobcontrol.
*
* Create the pipes that are used to grant children execution
- * permissions. If max_jobs is zero, count the CPUs from /proc/cpuinfo
- * and use that.
+ * permissions. If max_jobs is zero, count the number of CPUs from
+ * /proc/cpuinfo and use that.
*/
-int init_max_jobs(int max_jobs_requested)
+int init_jobcontrol(int max_jobs_requested)
{
+ struct epoll_event ev;
FILE *file;
int ret;
char buf[256];
int get_child_count(void);
int get_parent_count(void);
-int init_max_jobs(int max_jobs_requested);
+int init_jobcontrol(int max_jobs_requested);
int poll_job_requests(int timeout);
int do_fork(void);
int do_fork_limited(void);