aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ngircd-handle-zombies.patch
diff options
context:
space:
mode:
authorTaylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>2015-01-31 22:03:25 +0100
committerTaylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>2015-02-05 17:08:39 +0100
commitea119a288f097b16ffa617daa1f07bae9aa6e65a (patch)
tree021071286fa9d847cebe238b75586b87eb0c13aa /gnu/packages/patches/ngircd-handle-zombies.patch
parent0ca0ce53a801702f6f56d68289675d4b448e026a (diff)
downloadguix-ea119a288f097b16ffa617daa1f07bae9aa6e65a.tar
guix-ea119a288f097b16ffa617daa1f07bae9aa6e65a.tar.gz
gnu: Add ngircd.
* gnu/packages/messaging.scm (ngircd): New variable. * gnu/packages/patches/ngircd-no-dns-in-tests.patch: New file. * gnu/packages/patches/ngircd-handle-zombies.patch: New file. * gnu-system.am (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/ngircd-handle-zombies.patch')
-rw-r--r--gnu/packages/patches/ngircd-handle-zombies.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/ngircd-handle-zombies.patch b/gnu/packages/patches/ngircd-handle-zombies.patch
new file mode 100644
index 0000000000..99475ba096
--- /dev/null
+++ b/gnu/packages/patches/ngircd-handle-zombies.patch
@@ -0,0 +1,36 @@
+The Guile process taking the role of PID 1 during Guix builds does not reap
+zombie processes, which makes them continue responding to "kill -0".
+
+--- a/src/testsuite/stop-server.sh 2015-02-05 11:24:00.535908842 +0100
++++ b/src/testsuite/stop-server.sh 2015-02-05 11:25:00.264351349 +0100
+@@ -1,6 +1,21 @@
+ #!/bin/sh
+ # ngIRCd Test Suite
+
++process_is_alive(){
++ ! process_is_dead "$1" && ! process_is_undead "$1"
++}
++
++process_is_dead(){
++ ! kill -0 "$1"
++}
++
++process_is_undead(){
++ case $(ps -p "$1" -o state=) in
++ (Z*) true ;;
++ (*) false ;;
++ esac
++}
++
+ [ -z "$srcdir" ] && srcdir=`dirname $0`
+
+ # read in functions
+@@ -24,7 +40,7 @@
+
+ # waiting ...
+ for i in 1 2 3 4 5; do
+- kill -0 $pid > /dev/null 2>&1; r=$?
++ process_is_alive $pid > /dev/null 2>&1; r=$?
+ if [ $r -ne 0 ]; then
+ echo " ok".
+ exit 0