diff -ruN make.git_170517//job.c make.signal_num_jobs4//job.c
--- make.git_170517//job.c	2017-05-17 21:13:05.000000000 +0200
+++ make.signal_num_jobs4//job.c	2017-05-22 22:43:23.000000000 +0200
@@ -247,6 +247,7 @@
 /* Number of jobserver tokens this instance is currently using.  */
 
 unsigned int jobserver_tokens = 0;
+unsigned int decrease_jobs = 0;
 
 
 #ifdef WINDOWS32
@@ -1006,7 +1007,11 @@
   /* If we're using the jobserver and this child is not the only outstanding
      job, put a token back into the pipe for it.  */
 
-  if (jobserver_enabled () && jobserver_tokens > 1)
+  if(decrease_jobs > 0)
+    {
+      decrease_jobs--;
+    }
+  else if (jobserver_enabled () && jobserver_tokens > 1)
     {
       jobserver_release (1);
       DB (DB_JOBS, (_("Released token for child %p (%s).\n"),
diff -ruN make.git_170517//job.h make.signal_num_jobs4//job.h
--- make.git_170517//job.h	2017-05-17 21:13:05.000000000 +0200
+++ make.signal_num_jobs4//job.h	2017-05-22 22:43:23.000000000 +0200
@@ -157,3 +157,4 @@
 #endif
 
 extern unsigned int jobserver_tokens;
+extern unsigned int decrease_jobs;
diff -ruN make.git_170517//main.c make.signal_num_jobs4//main.c
--- make.git_170517//main.c	2017-05-17 21:13:05.000000000 +0200
+++ make.signal_num_jobs4//main.c	2017-05-22 22:49:56.000000000 +0200
@@ -719,6 +719,42 @@
 {
   db_level = db_level ? DB_NONE : DB_BASIC;
 }
+static RETSIGTYPE
+decrease_job_signal_handler (int sig UNUSED)
+{
+  if (master_job_slots > 1)
+  {
+    decrease_jobs++;
+    master_job_slots--;
+    ON (error, NILF, "Decreased number of jobs to %d\n", master_job_slots);
+  }
+  else
+  {
+    O (error, NILF, "Unable to decrease number of jobs\n");
+  }
+}
+
+static RETSIGTYPE
+increase_job_signal_handler (int sig UNUSED)
+{
+  bsd_signal (SIGUSR1, decrease_job_signal_handler);
+  if (( ! master_job_slots ) && jobserver_setup ( 0 ))
+    {
+      /* make was initially started without -j, needed to start job server */
+      /* Fill in the jobserver_auth for our children.  */
+      jobserver_auth = jobserver_get_auth ();
+
+      if (jobserver_auth)
+        {
+          /* We're using the jobserver so set job_slots to 0.  */
+          master_job_slots = 1;
+          job_slots = 0;
+        }
+    }
+  jobserver_release (1);
+  master_job_slots++;
+  ON (error, NILF, "Increased number of jobs to %d\n", master_job_slots);
+}
 #endif
 
 static void
@@ -1907,6 +1943,9 @@
 #ifdef SIGUSR1
   bsd_signal (SIGUSR1, debug_signal_handler);
 #endif
+#ifdef SIGUSR2
+  bsd_signal (SIGUSR2, increase_job_signal_handler);
+#endif
 
   /* Define the initial list of suffixes for old-style rules.  */
   set_default_suffixes ();
diff -ruN make.git_170517//w32/w32os.c make.signal_num_jobs4//w32/w32os.c
--- make.git_170517//w32/w32os.c	2017-05-17 21:13:05.000000000 +0200
+++ make.signal_num_jobs4//w32/w32os.c	2017-05-22 22:43:23.000000000 +0200
@@ -49,7 +49,7 @@
   jobserver_semaphore = CreateSemaphore (
       NULL,                           /* Use default security descriptor */
       slots,                          /* Initial count */
-      slots,                          /* Maximum count */
+      MAXIMUM_WAIT_OBJECTS - 1,       /* Maximum count */
       jobserver_semaphore_name);      /* Semaphore name */
 
   if (jobserver_semaphore == NULL)
