diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2008-02-20 02:06:11 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2008-02-20 02:06:11 +0000 |
commit | 792dc31f1432112a22415b977264143f546f74d3 (patch) | |
tree | 568383c036471c84bf1e2e41e3f2dd4d5ad8808e /net/omnitty | |
parent | 8e0c48ad835b9bff1711b598c038e75e865c4e19 (diff) |
- 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)
Notes
Notes:
svn path=/head/; revision=207621
Diffstat (limited to 'net/omnitty')
-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 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(); |