changeset 76:c7e29639f915

Tests: backout process group creation (b01ae969181b). This turns to be bad idea since hitting ^C no longer works as expected and leaves daemons running. And it's not used anyway.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 28 Mar 2009 01:17:25 +0300
parents b01ae969181b
children ff5f4f298532
files lib/Test/Nginx.pm
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -114,8 +114,7 @@ sub stop() {
 
 	while ($self->{_daemons} && scalar @{$self->{_daemons}}) {
 		my $p = shift @{$self->{_daemons}};
-		# SIGTERM to process group
-		kill -15, $p;
+		kill 'TERM', $p;
 		wait;
 	}
 
@@ -155,7 +154,6 @@ sub run_daemon($;@) {
 	die "Can't fork daemon: $!\n" unless defined $pid;
 
 	if ($pid == 0) {
-		setpgrp(0, 0);
 		if (ref($code) eq 'CODE') {
 			$code->(@args);
 			exit 0;