From b422d0f39f7ced40dc29a140c5efdde612d1f153 Mon Sep 17 00:00:00 2001 From: thib Date: Wed, 21 Jun 2000 10:45:35 +0000 Subject: [PATCH] termination of a job is not any more reported as "explain" --- job.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/job.c b/job.c index 59c99d9..bb9afbd 100644 --- a/job.c +++ b/job.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: job.c,v 1.12 2000-06-21 09:49:01 thib Exp $ */ + /* $Id: job.c,v 1.14 2000-06-21 10:45:35 thib Exp $ */ #include "fcron.h" @@ -82,23 +82,6 @@ run_job(CL *line) pid_t pid; - /* append job to the list of executed job */ - if ( exe_num >= exe_array_size ) { - CL **ptr = NULL; - short int old_size = exe_array_size; - - debug("Resizing exe_array"); - exe_array_size = (exe_array_size + EXE_ARRAY_GROW_SIZE); - - if ( (ptr = calloc(exe_array_size, sizeof(CL *))) == NULL ) - die_e("could not calloc exe_array"); - - memcpy(ptr, exe_array, (sizeof(CL *) * old_size)); - free(exe_array); - exe_array = ptr; - } - exe_array[exe_num++] = line; - /* prepare the job execution */ switch ( pid = fork() ) { case -1: @@ -210,7 +193,7 @@ run_job(CL *line) line->cl_pid = pid; line->cl_file->cf_running += 1; - explain(" Job `%s' started (pid %d)", line->cl_shell, line->cl_pid); + explain("Job `%s' started (pid %d)", line->cl_shell, line->cl_pid); } @@ -237,7 +220,7 @@ end_job(CL *line, int status, int mailfd, short mailpos) m= (mail_output == 1) ? " (mailing output)" : ""; if (WIFEXITED(status) && WEXITSTATUS(status)==0) { foreground = 0; - explain("Job `%s' terminated%s", line->cl_shell, m); + debug("Job `%s' terminated%s", line->cl_shell, m); } else if (WIFEXITED(status)) explain("Job `%s' terminated (exit status: %d)%s", -- 2.50.0