{
DB (DB_JOBS, (_("Removing child %p PID %s%s from chain.\n"),
c, pid2str (c->pid), c->remote ? _(" (remote)") : ""));
-
- /* There is now another slot open. */
- if (job_slots_used > 0)
- --job_slots_used;
}
+ /* There is now another slot open. */
+ if (job_slots_used > 0)
+ job_slots_used -= c->jobslot;
+
/* Remove the child from the chain and free it. */
if (lastc == 0)
children = c->next;
c->remote ? _(" (remote)") : ""));
/* One more job slot is in use. */
++job_slots_used;
+ assert (c->jobslot == 0);
+ c->jobslot = 1;
}
children = c;
unblock_sigs ();
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
unsigned int deleted:1; /* Nonzero if targets have been deleted. */
unsigned int recursive:1; /* Nonzero for recursive command ('+' etc.) */
+ unsigned int jobslot:1; /* Nonzero if it's reserved a job slot. */
unsigned int dontcare:1; /* Saved dontcare flag. */
};
run_make_test(qq!
one: ; -$unk xx yy
-two: ; $unk aa bb
!,
'one', "$unk xx yy\n#MAKE#: $unk: $err\n#MAKE#: [#MAKEFILE#;2: one] Error 127 (ignored)\n");
# TEST #4
# -------
-run_make_test(undef, 'two -i',
- "$unk aa bb\n#MAKE#: $unk: $err\n#MAKE#: [#MAKEFILE#;3: two] Error 127 (ignored)\n");
+run_make_test(qq!
+two: ; $unk aa bb
+!, 'two -i',
+ "$unk aa bb\n#MAKE#: $unk: $err\n#MAKE#: [#MAKEFILE#;2: two] Error 127 (ignored)\n");
# TEST #5
# -------
run_make_test(undef, 'two',
- "$unk aa bb\n#MAKE#: $unk: $err\n#MAKE#: *** [#MAKEFILE#;3: two] Error 127\n", 512);
+ "$unk aa bb\n#MAKE#: $unk: $err\n#MAKE#: *** [#MAKEFILE#;2: two] Error 127\n", 512);
+
+# SV #56918 : Test the unknown command as the second recipe line
+
+run_make_test(qq!
+three:
+\t\@echo one
+\t$unk qq rr
+!, 'three',
+ "one\n$unk qq rr\n#MAKE#: $unk: $err\n#MAKE#: *** [#MAKEFILE#;4: three] Error 127\n", 512);
# Try failing due to non-executable file