summaryrefslogtreecommitdiff
path: root/usr.bin/mail/popen.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-11-14 00:24:02 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-11-14 00:24:02 +0000
commit8ec4e47fe6d683fddd1983b7fea55314ad49fb63 (patch)
tree49a69dd7fe86c654e79bfdc2bf8ba84754d702fc /usr.bin/mail/popen.c
parent142716f9ecd84b5d73af804d20cc15f9b67ca3f7 (diff)
NetBSD changes (mostly comsmetic):
replace panic() with calls to err()/errx() use S_IS* instead of doing by hand with S_IF*. Use TIMESPEC_TO_TIMEVAL() and gettimeofday instead of time(2) Use _POSIX_VDISABLE, not 0 Kill register
Diffstat (limited to 'usr.bin/mail/popen.c')
-rw-r--r--usr.bin/mail/popen.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/mail/popen.c b/usr.bin/mail/popen.c
index 07f6ecfac82..d7e528e59cc 100644
--- a/usr.bin/mail/popen.c
+++ b/usr.bin/mail/popen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: popen.c,v 1.13 1997/08/31 14:32:14 millert Exp $ */
+/* $OpenBSD: popen.c,v 1.14 1997/11/14 00:23:54 millert Exp $ */
/* $NetBSD: popen.c,v 1.6 1997/05/13 06:48:42 mikel Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)popen.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: popen.c,v 1.13 1997/08/31 14:32:14 millert Exp $";
+static char rcsid[] = "$OpenBSD: popen.c,v 1.14 1997/11/14 00:23:54 millert Exp $";
#endif
#endif /* not lint */
@@ -181,7 +181,7 @@ register_file(fp, pipe, pid)
struct fp *fpp;
if ((fpp = (struct fp *)malloc(sizeof(*fpp))) == NULL)
- panic("Out of memory");
+ errx(1, "Out of memory");
fpp->fp = fp;
fpp->pipe = pipe;
fpp->pid = pid;
@@ -201,7 +201,7 @@ unregister_file(fp)
(void)free(p);
return;
}
- panic("Invalid file pointer");
+ errx(1, "Invalid file pointer");
}
static int
@@ -213,7 +213,7 @@ file_pid(fp)
for (p = fp_head; p; p = p->link)
if (p->fp == fp)
return(p->pid);
- panic("Invalid file pointer");
+ errx(1, "Invalid file pointer");
/*NOTREACHED*/
}
@@ -314,7 +314,7 @@ static struct child *
findchild(pid)
int pid;
{
- register struct child **cpp;
+ struct child **cpp;
for (cpp = &child; *cpp != NULL && (*cpp)->pid != pid;
cpp = &(*cpp)->link)
@@ -330,9 +330,9 @@ findchild(pid)
static void
delchild(cp)
- register struct child *cp;
+ struct child *cp;
{
- register struct child **cpp;
+ struct child **cpp;
for (cpp = &child; *cpp != cp; cpp = &(*cpp)->link)
;
@@ -346,7 +346,7 @@ sigchild(signo)
{
int pid;
int status;
- register struct child *cp;
+ struct child *cp;
int save_errno = errno;
while ((pid =
@@ -371,7 +371,7 @@ int
wait_child(pid)
int pid;
{
- register struct child *cp = findchild(pid);
+ struct child *cp = findchild(pid);
sigset_t nset, oset;
sigemptyset(&nset);
@@ -393,7 +393,7 @@ void
free_child(pid)
int pid;
{
- register struct child *cp = findchild(pid);
+ struct child *cp = findchild(pid);
sigset_t nset, oset;
sigemptyset(&nset);
@@ -432,7 +432,7 @@ handle_spool_locks(action)
} else if (action == 1) {
/* Create the lock */
if ((cmd = (char *)malloc(sizeof(_PATH_MAIL_LOCAL) + 3)) == NULL)
- panic("Out of memory");
+ errx(1, "Out of memory");
sprintf(cmd, "%s -H", _PATH_MAIL_LOCAL);
if ((lockfp = Popen(cmd, "r")) == NULL || getc(lockfp) != '1') {
lockfp = NULL;