-/* $OpenBSD: atrun.c,v 1.20 2013/11/23 19:18:52 deraadt Exp $ */
+/* $OpenBSD: atrun.c,v 1.21 2015/01/14 17:27:29 millert Exp $ */
/*
* Copyright (c) 2002-2003 Todd C. Miller <Todd.Miller@courtesan.com>
pid_t pid;
long nuid, ngid;
FILE *fp;
- WAIT_T waiter;
+ int waiter;
size_t nread;
char *cp, *ep, mailto[MAX_UNAME], buf[BUFSIZ];
int fd, always_mail;
-/* $OpenBSD: cron.c,v 1.46 2014/11/26 18:34:52 millert Exp $ */
+/* $OpenBSD: cron.c,v 1.47 2015/01/14 17:27:29 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
static void
sigchld_reaper(void) {
- WAIT_T waiter;
- PID_T pid;
+ int waiter;
+ pid_t pid;
do {
pid = waitpid(-1, &waiter, WNOHANG);
-/* $OpenBSD: crontab.c,v 1.66 2015/01/14 17:27:13 millert Exp $ */
+/* $OpenBSD: crontab.c,v 1.67 2015/01/14 17:27:29 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
static char *getoptargs = "u:ler";
#endif
-static PID_T Pid;
+static pid_t Pid;
static char User[MAX_UNAME], RealUser[MAX_UNAME];
static char Filename[MAX_FNAME], TempFilename[MAX_FNAME];
static FILE *NewCrontab;
-/* $OpenBSD: database.c,v 1.19 2010/12/14 23:31:33 millert Exp $ */
+/* $OpenBSD: database.c,v 1.20 2015/01/14 17:27:29 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
load_database(cron_db *old_db) {
struct stat statbuf, syscron_stat;
cron_db new_db;
- DIR_T *dp;
+ struct dirent *dp;
DIR *dir;
user *u, *nu;
-/* $OpenBSD: do_command.c,v 1.38 2013/11/23 18:23:00 deraadt Exp $ */
+/* $OpenBSD: do_command.c,v 1.39 2015/01/14 17:27:30 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
/* wait for children to die.
*/
for (; children > 0; children--) {
- WAIT_T waiter;
- PID_T pid;
+ int waiter;
+ pid_t pid;
Debug(DPROC, ("[%ld] waiting for grandchild #%d to finish\n",
(long)getpid(), children))
-/* $OpenBSD: externs.h,v 1.13 2015/01/14 17:27:13 millert Exp $ */
+/* $OpenBSD: externs.h,v 1.14 2015/01/14 17:27:30 millert Exp $ */
/* Copyright 1993,1994 by Paul Vixie
* All rights reserved
# include <bsd_auth.h>
#endif /*BSD_AUTH*/
-#define DIR_T struct dirent
-#define WAIT_T int
-#define SIG_T sig_t
-#define PID_T pid_t
-
#ifndef TZNAME_ALREADY_DEFINED
extern char *tzname[2];
#endif
-/* $OpenBSD: misc.c,v 1.49 2015/01/14 17:27:13 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.50 2015/01/14 17:27:30 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
}
void
-log_it(const char *username, PID_T xpid, const char *event, const char *detail) {
+log_it(const char *username, pid_t xpid, const char *event, const char *detail) {
#if defined(LOG_FILE) || DEBUGGING
- PID_T pid = xpid;
+ pid_t pid = xpid;
#endif
#if defined(LOG_FILE)
char *msg;
-/* $OpenBSD: popen.c,v 1.22 2011/08/22 19:32:42 millert Exp $ */
+/* $OpenBSD: popen.c,v 1.23 2015/01/14 17:27:30 millert Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
* may create a pipe to a hidden program as a side effect of a list or dir
* command.
*/
-static PID_T *pids;
+static pid_t *pids;
static int fds;
FILE *
char *cp;
FILE *iop;
int argc, pdes[2];
- PID_T pid;
+ pid_t pid;
char *argv[MAX_ARGV];
if ((*type != 'r' && *type != 'w') || type[1] != '\0')
if (!pids) {
if ((fds = sysconf(_SC_OPEN_MAX)) <= 0)
return (NULL);
- if (!(pids = calloc(fds, sizeof(PID_T))))
+ if (!(pids = calloc(fds, sizeof(pid_t))))
return (NULL);
}
if (pipe(pdes) < 0)
int
cron_pclose(FILE *iop) {
int fdes;
- PID_T pid;
- WAIT_T status;
+ pid_t pid;
+ int status;
sigset_t sigset, osigset;
/*