diff options
author | rafan <rafan@FreeBSD.org> | 2008-02-20 10:06:11 +0800 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2008-02-20 10:06:11 +0800 |
commit | fd64f21f02c70513c7992153dfcc0809055cf853 (patch) | |
tree | eca1e520924b28db55b1a3d5c321eedcc48ba1a6 /net | |
parent | fca291d2c8aa838e0fa43da8f01dd753bfa5a19d (diff) | |
download | freebsd-ports-graphics-fd64f21f02c70513c7992153dfcc0809055cf853.tar.gz freebsd-ports-graphics-fd64f21f02c70513c7992153dfcc0809055cf853.tar.zst freebsd-ports-graphics-fd64f21f02c70513c7992153dfcc0809055cf853.zip |
- 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)
Diffstat (limited to 'net')
-rw-r--r-- | net/omnitty/Makefile | 1 | ||||
-rw-r--r-- | net/omnitty/files/patch-main.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/net/omnitty/Makefile b/net/omnitty/Makefile index 3230cc2e046..e1416cab027 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 00000000000..b397e4293d9 --- /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(); |