remove truely atrocious use of FILE internals.
If you don't want fclose(f) to flush the file, just close the underlying file descriptor, then fclose() doesn't have anything to hang upon.
This commit is contained in:
parent
0e6e6a6644
commit
357f6e3acb
@ -1,11 +1,13 @@
|
|||||||
# $OpenBSD: Makefile,v 1.14 2004/12/20 10:35:35 alek Exp $
|
# $OpenBSD: Makefile,v 1.15 2005/04/21 10:47:37 espie Exp $
|
||||||
|
|
||||||
COMMENT= "log out idle users and those hogging resources"
|
COMMENT= "log out idle users and those hogging resources"
|
||||||
|
|
||||||
DISTNAME= idled-1.16
|
DISTNAME= idled-1.16
|
||||||
|
PKGNAME= ${DISTNAME}p0
|
||||||
CATEGORIES= sysutils
|
CATEGORIES= sysutils
|
||||||
MASTER_SITES= http://www.darkwing.com/idled/download/ \
|
MASTER_SITES= http://www.darkwing.com/idled/download/ \
|
||||||
ftp://ftp.cs.hope.edu/pub/idled/
|
ftp://ftp.cs.hope.edu/pub/idled/
|
||||||
|
HOMEPAGE= http://www.darkwing.com/idled/
|
||||||
|
|
||||||
FAKE_FLAGS= PREFIX=${PREFIX} DESTDIR=${WRKINST}
|
FAKE_FLAGS= PREFIX=${PREFIX} DESTDIR=${WRKINST}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
$OpenBSD: patch-Makefile,v 1.1 2001/06/14 03:18:28 pvalchev Exp $
|
$OpenBSD: patch-Makefile,v 1.2 2005/04/21 10:47:37 espie Exp $
|
||||||
--- Makefile.orig Thu May 16 16:05:28 1996
|
--- Makefile.orig Fri May 17 00:05:28 1996
|
||||||
+++ Makefile Tue Jun 12 19:44:17 2001
|
+++ Makefile Wed Apr 20 11:57:59 2005
|
||||||
@@ -2,7 +2,6 @@
|
@@ -2,7 +2,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -41,15 +41,14 @@ $OpenBSD: patch-Makefile,v 1.1 2001/06/14 03:18:28 pvalchev Exp $
|
|||||||
-DEFS += -DSYSV -DHAVE_PROC_FS -DUTMPPID -DHAVE_SETSID -DHAVE_UTMPX -DUTMPHOST -DRUDEKILL
|
-DEFS += -DSYSV -DHAVE_PROC_FS -DUTMPPID -DHAVE_SETSID -DHAVE_UTMPX -DUTMPHOST -DRUDEKILL
|
||||||
-SPECLIBS =
|
-SPECLIBS =
|
||||||
-INSTTYPE = install3
|
-INSTTYPE = install3
|
||||||
-
|
+#DEFS += -DSYSV -DHAVE_PROC_FS -DUTMPPID -DHAVE_SETSID -DHAVE_UTMPX -DUTMPHOST -DRUDEKILL
|
||||||
|
+#SPECLIBS =
|
||||||
|
+#INSTTYPE = install3
|
||||||
|
|
||||||
-DEST = /usr/local/bin
|
-DEST = /usr/local/bin
|
||||||
-CFDEST = /usr/local/lib
|
-CFDEST = /usr/local/lib
|
||||||
-MDEST = /usr/local/man
|
-MDEST = /usr/local/man
|
||||||
-LOGDEST = /var/log
|
-LOGDEST = /var/log
|
||||||
+#DEFS += -DSYSV -DHAVE_PROC_FS -DUTMPPID -DHAVE_SETSID -DHAVE_UTMPX -DUTMPHOST -DRUDEKILL
|
|
||||||
+#SPECLIBS =
|
|
||||||
+#INSTTYPE = install3
|
|
||||||
+
|
|
||||||
+#DEST = /usr/local/bin
|
+#DEST = /usr/local/bin
|
||||||
+#CFDEST = /usr/local/lib
|
+#CFDEST = /usr/local/lib
|
||||||
+#MDEST = /usr/local/man
|
+#MDEST = /usr/local/man
|
||||||
@ -90,14 +89,14 @@ $OpenBSD: patch-Makefile,v 1.1 2001/06/14 03:18:28 pvalchev Exp $
|
|||||||
+ ${BSD_INSTALL_DATA} ${COMMFILE}.template ${CFDEST}
|
+ ${BSD_INSTALL_DATA} ${COMMFILE}.template ${CFDEST}
|
||||||
+ ${BSD_INSTALL_MAN} ${CFMAN} ${MDEST}/man5
|
+ ${BSD_INSTALL_MAN} ${CFMAN} ${MDEST}/man5
|
||||||
+ ${BSD_INSTALL_MAN} ${PMAN} ${MDEST}/man8
|
+ ${BSD_INSTALL_MAN} ${PMAN} ${MDEST}/man8
|
||||||
+ @echo ""
|
|
||||||
+ @echo "*** Be sure to edit/create the file ${CONFIG} based on"
|
|
||||||
+ @echo "*** the needs for your system. The ${CFLIB}/${COMMFILE}.template"
|
|
||||||
+ @echo "*** file can serve as a guide, as well as the man pages."
|
|
||||||
@echo ""
|
@echo ""
|
||||||
- @echo "Be sure to edit/create the file ${CONFIG} based on"
|
- @echo "Be sure to edit/create the file ${CONFIG} based on"
|
||||||
- @echo "the needs for your system. The ${CONFIG}.template"
|
- @echo "the needs for your system. The ${CONFIG}.template"
|
||||||
- @echo "file can serve as a guide, as well as the man pages."
|
- @echo "file can serve as a guide, as well as the man pages."
|
||||||
|
+ @echo "*** Be sure to edit/create the file ${CONFIG} based on"
|
||||||
|
+ @echo "*** the needs for your system. The ${CFLIB}/${COMMFILE}.template"
|
||||||
|
+ @echo "*** file can serve as a guide, as well as the man pages."
|
||||||
|
+ @echo ""
|
||||||
|
|
||||||
# Aix Prefers install2
|
# Aix Prefers install2
|
||||||
install2: all
|
install2: all
|
||||||
|
29
sysutils/idled/patches/patch-warn_c
Normal file
29
sysutils/idled/patches/patch-warn_c
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
$OpenBSD: patch-warn_c,v 1.1 2005/04/21 10:47:37 espie Exp $
|
||||||
|
--- warn.c.orig Thu Apr 21 12:43:40 2005
|
||||||
|
+++ warn.c Thu Apr 21 12:45:48 2005
|
||||||
|
@@ -139,24 +139,7 @@ void warn(i, type, do_msg)
|
||||||
|
{
|
||||||
|
if (opened)
|
||||||
|
{
|
||||||
|
- /* Prevent the close from flushing unwritten data, since that is
|
||||||
|
- * probably the block that caused us to get here in the first
|
||||||
|
- * place. This probably isn't very portable, but I can't find
|
||||||
|
- * any other method that works (barring changing all the output
|
||||||
|
- * here to use a simple file descriptor instead of a FILE *).
|
||||||
|
- * Linux is the only system I have seen that doesn't have the
|
||||||
|
- * _ptr and _base. Let me know if there are others, or if you
|
||||||
|
- * have a system independant way to fix it!
|
||||||
|
- */
|
||||||
|
-#if defined(__linux__)
|
||||||
|
- termf->_IO_read_ptr = termf->_IO_read_base;
|
||||||
|
- termf->_IO_write_ptr = termf->_IO_write_base;
|
||||||
|
-#elif defined(BSDI) || defined(BSD_OS2)
|
||||||
|
- termf->_p = (termf->_ub)._base;
|
||||||
|
-#else
|
||||||
|
- termf->_ptr = termf->_base;
|
||||||
|
-#endif
|
||||||
|
- (void) fclose (termf);
|
||||||
|
+ close (fileno(termf));
|
||||||
|
}
|
||||||
|
|
||||||
|
exit (0);
|
Loading…
Reference in New Issue
Block a user