From 792dc31f1432112a22415b977264143f546f74d3 Mon Sep 17 00:00:00 2001 From: Rong-En Fan Date: Wed, 20 Feb 2008 02:06:11 +0000 Subject: - After SA 08:01.pty, openpty() calls fork and omnitty has a bad assumption that library calls do not do that. Therefore, it's SIGCHLD handling causes a hang in wait() as openpty() already does that. Fix this by using waitpid() with WNOHANG. Diagnosed by: jhb Tested by: dhw (earlier version) --- net/omnitty/Makefile | 1 + net/omnitty/files/patch-main.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 net/omnitty/files/patch-main.c (limited to 'net/omnitty') diff --git a/net/omnitty/Makefile b/net/omnitty/Makefile index 3230cc2e046d..e1416cab027d 100644 --- a/net/omnitty/Makefile +++ b/net/omnitty/Makefile @@ -7,6 +7,7 @@ PORTNAME= omnitty PORTVERSION= 0.3.0 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/net/omnitty/files/patch-main.c b/net/omnitty/files/patch-main.c new file mode 100644 index 000000000000..b397e4293d93 --- /dev/null +++ b/net/omnitty/files/patch-main.c @@ -0,0 +1,16 @@ +--- main.c.orig 2005-10-26 06:08:25.000000000 +0800 ++++ main.c 2008-02-17 22:45:29.000000000 +0800 +@@ -335,9 +335,10 @@ + + while (!quit) { + if (zombie_count) { +- zombie_count--; +- chldpid = wait(NULL); +- machmgr_handle_death(chldpid); ++ if ((chldpid = waitpid(-1, NULL, WNOHANG)) > 0) { ++ zombie_count--; ++ machmgr_handle_death(chldpid); ++ } + } + + machmgr_update(); -- cgit v1.2.3