* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: database.c,v 1.47 2001-02-01 20:52:14 thib Exp $ */
+ /* $Id: database.c,v 1.48 2001-02-14 13:53:17 thib Exp $ */
#include "fcron.h"
(since->tm_year + 1900), since->tm_wday, since->tm_hour,
since->tm_min);
xwrite(fd, buf);
- snprintf(buf, sizeof(buf), "It will be next executed at %d/%d/%d wday:"
+ snprintf(buf,sizeof(buf),"It will be next executed at %d/%d/%d wday:"
"%d %02d:%02d\n", (next.tm_mon + 1), next.tm_mday,
(next.tm_year+1900), next.tm_wday, next.tm_hour, next.tm_min);
xwrite(fd, buf);
snprintf(buf, sizeof(buf), "due to a too high system load average or "
"too many lavg-serial jobs.\n");
xwrite(fd, buf);
- snprintf(buf, sizeof(buf), "It will be next executed at %d/%d/%d wday:"
- "%d %02d:%02d\n", (next.tm_mon + 1), next.tm_mday,
+ snprintf(buf, sizeof(buf), "It will be next executed at %d/%d/%d "
+ "wday:%d %02d:%02d\n", (next.tm_mon + 1), next.tm_mday,
(next.tm_year+1900), next.tm_wday, next.tm_hour, next.tm_min);
xwrite(fd, buf);
}
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fcron.c,v 1.40 2001-02-10 12:56:02 thib Exp $ */
+ /* $Id: fcron.c,v 1.41 2001-02-14 13:52:38 thib Exp $ */
#include "fcron.h"
-char rcs_info[] = "$Id: fcron.c,v 1.40 2001-02-10 12:56:02 thib Exp $";
+char rcs_info[] = "$Id: fcron.c,v 1.41 2001-02-14 13:52:38 thib Exp $";
void main_loop(void);
void check_signal(void);
if ( ! (pass = getpwnam(USERNAME)) )
die("user \"%s\" is not in passwd file. Aborting.", USERNAME);
if (setregid(pass->pw_gid, 0) != 0 )
- die_e("Could not set gid to " GROUPNAME);
+ die_e("Could not setregid to " GROUPNAME);
if (setreuid(pass->pw_uid, 0) != 0 )
- die_e("Could not set uid to " USERNAME);
+ die_e("Could not setreuid to " USERNAME);
}
#endif
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: log.c,v 1.4 2001-01-12 21:42:44 thib Exp $ */
+ /* $Id: log.c,v 1.5 2001-02-14 13:52:09 thib Exp $ */
/* This code is inspired by Anacron's sources of
Itai Tzur <itzur@actcom.co.il> ( thanks to him ) */
static void xopenlog(void);
-static char truncated[]=" (truncated)";
+static char truncated[] = " (truncated)";
static int log_open=0;
xcloselog()
{
if (log_open) closelog();
- log_open=0;
+ log_open = 0;
}
return NULL;
/* There's some confusion in the documentation about what vsnprintf
* returns when the buffer overflows. Hmmm... */
- len=vsnprintf(msg, MAX_MSG + 1, fmt, args);
- if (len>=MAX_MSG)
- strcpy(msg+sizeof(msg)-sizeof(truncated), truncated);
+ len = vsnprintf(msg, MAX_MSG + 1, fmt, args);
+ if (len >= MAX_MSG)
+ strcpy(msg + sizeof(msg) - sizeof(truncated), truncated);
return msg;
}