lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 5854201b0535098c402eb346e3705349dd166fe2
parent 6a0767c4ef63d3efa6e106c774b29b9d31666eda
Author: Duncaen <mail@duncano.de>
Date:   Fri, 19 May 2017 19:01:22 +0200

usr.bin/calendar: update to OPENBSD_6_1

Diffstat:
usr.bin/calendar/day.c | 6++++--
usr.bin/calendar/io.c | 7+++++--
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c @@ -1,4 +1,4 @@ -/* $OpenBSD: day.c,v 1.33 2016/07/13 21:32:01 millert Exp $ */ +/* $OpenBSD: day.c,v 1.34 2016/09/14 15:09:46 millert Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -543,7 +543,9 @@ isnow(char *endp, int bodun) tdiff = difftime(ttmp, f_time)/ SECSPERDAY; if (tdiff <= offset + f_dayAfter || (bodun && tdiff == -1)) { - if ((tmtmp.tm_mon == month) && + if (((tmtmp.tm_mon == month) || + (flags & F_SPECIAL) || + (interval == WEEKLY)) && (tdiff >= 0 || (bodun && tdiff == -1))) { if ((tmp = malloc(sizeof(struct match))) == NULL) diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.43 2015/12/08 19:04:50 mmcc Exp $ */ +/* $OpenBSD: io.c,v 1.44 2016/08/31 09:38:47 jsg Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -335,12 +335,15 @@ opencal(void) } } - if (pipe(pdes) < 0) + if (pipe(pdes) < 0) { + close(fdin); return (NULL); + } switch (vfork()) { case -1: /* error */ (void)close(pdes[0]); (void)close(pdes[1]); + close(fdin); return (NULL); case 0: dup2(fdin, STDIN_FILENO);