SCCS-vsn: usr.bin/make/job.c 5.3
SCCS-vsn: usr.bin/make/main.c 5.5
SCCS-vsn: usr.bin/make/str.c 5.4
-static char sccsid[] = "@(#)job.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)job.c 5.3 (Berkeley) %G%";
#endif /* not lint */
/*-
#endif /* not lint */
/*-
{
"sh",
TRUE, "set -", "set -v", "set -", 5,
{
"sh",
TRUE, "set -", "set -v", "set -", 5,
-#if (defined(sun) && !defined(Sprite)) || defined(SYSV)
- TRUE, "set -e", "set +e",
-#else
FALSE, "echo \"%s\"\n", "sh -c '%s || exit 0'\n",
FALSE, "echo \"%s\"\n", "sh -c '%s || exit 0'\n",
/*
* If it exited non-zero and either we're doing things our
* way or we're not ignoring errors, the job is finished.
/*
* If it exited non-zero and either we're doing things our
* way or we're not ignoring errors, the job is finished.
- * Similarly, if the shell died because of a signal (the
- * conditional on SIGCONT is to handle the mapping of Sprite
- * signal semantics whereby wait will return a signal
- * termination with SIGCONT being the signal to indicate that the
- * child has resumed), the job is also finished. In these
+ * Similarly, if the shell died because of a signal
+ * the job is also finished. In these
* cases, finish out the job's output before printing the exit
* status...
*/
* cases, finish out the job's output before printing the exit
* status...
*/
while ((pid = wait3(&status, (block?0:WNOHANG)|WUNTRACED,
(struct rusage *)0)) > 0)
{
while ((pid = wait3(&status, (block?0:WNOHANG)|WUNTRACED,
(struct rusage *)0)) > 0)
{
- if (DEBUG(JOB)) {
-#ifdef Sprite
- printf("Process %x exited or stopped.\n", pid);
-#else
printf("Process %d exited or stopped.\n", pid);
printf("Process %d exited or stopped.\n", pid);
jnode = Lst_Find (jobs, (ClientData)pid, JobCmpPid);
jnode = Lst_Find (jobs, (ClientData)pid, JobCmpPid);
if (WIFSIGNALED(status) && (status.w_termsig == SIGCONT)) {
jnode = Lst_Find(stoppedJobs, (ClientData)pid, JobCmpPid);
if (jnode == NILLNODE) {
if (WIFSIGNALED(status) && (status.w_termsig == SIGCONT)) {
jnode = Lst_Find(stoppedJobs, (ClientData)pid, JobCmpPid);
if (jnode == NILLNODE) {
-#ifdef Sprite
- Error("Resumed child (%x) not in table", pid);
-#else
Error("Resumed child (%d) not in table", pid);
Error("Resumed child (%d) not in table", pid);
continue;
}
job = (Job *)Lst_Datum(jnode);
(void)Lst_Remove(stoppedJobs, jnode);
} else {
continue;
}
job = (Job *)Lst_Datum(jnode);
(void)Lst_Remove(stoppedJobs, jnode);
} else {
-#ifdef Sprite
- Error ("Child (%x) not in table?", pid);
-#else
Error ("Child (%d) not in table?", pid);
Error ("Child (%d) not in table?", pid);
{
GNode *begin; /* node for commands to do at the very start */
{
GNode *begin; /* node for commands to do at the very start */
-#ifdef Sprite
- sprintf (tfile, "/tmp/make%05x", getpid());
-#else
sprintf (tfile, "/tmp/make%05d", getpid());
sprintf (tfile, "/tmp/make%05d", getpid());
jobs = Lst_Init (FALSE);
stoppedJobs = Lst_Init(FALSE);
jobs = Lst_Init (FALSE);
stoppedJobs = Lst_Init(FALSE);
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 5.5 (Berkeley) %G%";
#endif /* not lint */
/*-
#endif /* not lint */
/*-
-#include <stdio.h>
-#ifdef Sprite
-#include <stdlib.h>
-#endif /* Sprite */
#include <sys/types.h>
#include <sys/signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/signal.h>
#include <sys/stat.h>
#include "make.h"
extern int errno;
#include "make.h"
extern int errno;
-static char sccsid[] = "@(#)str.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)str.c 5.4 (Berkeley) %G%";
#endif /* not lint */
/*-
#endif /* not lint */
/*-
* the two strings, all this under the control
* of the STR_ flags given as the third arg.
*
* the two strings, all this under the control
* of the STR_ flags given as the third arg.
*
- * Str_FindSubstring Find a substring within a string (from
- * original Sprite libc).
+ * Str_FindSubstring Find a substring within a string
*
* Str_Match Pattern match two strings.
*/
*
* Str_Match Pattern match two strings.
*/
/*
*----------------------------------------------------------------------
/*
*----------------------------------------------------------------------
/*
*----------------------------------------------------------------------
*
/*
*----------------------------------------------------------------------
*