* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fileconf.c,v 1.37 2001-01-30 17:41:35 thib Exp $ */
+ /* $Id: fileconf.c,v 1.38 2001-02-01 20:49:31 thib Exp $ */
#include "fcrontab.h"
fprintf(stderr, " Opt : \"%s\" %d\n", opt_name, i);
}
+ else if( strcmp(opt_name, "nolog") == 0 ) {
+ if ( in_brackets && (ptr = get_bool(ptr, &i)) == NULL )
+ Handle_err;
+ if ( i == 0 )
+ clear_nolog(cl->cl_option);
+ else
+ set_nolog(cl->cl_option);
+ if (debug_opt)
+ fprintf(stderr, " Opt : \"%s\" %d\n", opt_name, i);
+ }
+
else if(strcmp(opt_name, "n") == 0 || strcmp(opt_name, "nice") == 0) {
if( ! in_brackets || (ptr = get_nice(ptr, &i)) == NULL )
Handle_err;
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: job.c,v 1.32 2001-01-30 17:42:27 thib Exp $ */
+ /* $Id: job.c,v 1.33 2001-02-01 20:52:06 thib Exp $ */
#include "fcron.h"
exeent->e_pid = pid;
line->cl_file->cf_running += 1;
- explain("Job %s started (pid %d)", line->cl_shell, pid);
+ if ( ! is_nolog(line->cl_option) )
+ explain("Job %s started (pid %d)", line->cl_shell, pid);
}
debug("Job %s terminated%s", line->cl_shell, m);
}
else if (WIFEXITED(status))
- explain("Job %s terminated (exit status: %d)%s",
+ warn("Job %s terminated (exit status: %d)%s",
line->cl_shell, WEXITSTATUS(status), m);
else if (WIFSIGNALED(status))
error("Job %s terminated due to signal %d%s",
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: option.h,v 1.15 2001-01-27 15:45:08 thib Exp $ */
+ /* $Id: option.h,v 1.16 2001-02-01 20:53:11 thib Exp $ */
/* This has been inspired from bitstring(3) : here is the original copyright :
*/
19 Freq (ie daily) is from middle to middle of interval (ie nightly) ?
20 Should we remove a %-job from lavg queue if the interval is exceeded ?
21 Should user be mailed if a %-job has not run during a period ?
+ 22 Should fcron log everything about this job or just errors ?
*/
(_bit_clear(opt, 21))
+/*
+ bit 22 : set to 1 : do not log normal activity of this job (only errors)
+ set to 0 : log everything
+*/
+#define is_nolog(opt) \
+ (_bit_test(opt, 22))
+#define set_nolog(opt) \
+ (_bit_set(opt, 22))
+#define clear_nolog(opt) \
+ (_bit_clear(opt, 22))
+
+
#endif /* __OPTIONH__ */