
Index: unreal.in
===================================================================
RCS file: /cvs/unreal/Attic/unreal.in,v
retrieving revision 1.1.2.5.2.7
diff -u -B -r1.1.2.5.2.7 unreal.in
--- unreal.in	22 Oct 2010 13:08:05 -0000	1.1.2.5.2.7
+++ unreal.in	31 Dec 2010 14:00:55 -0000
@@ -33,7 +33,7 @@
 		echo "ERROR: UnrealIRCd is not running"
 		exit 1
 	fi
-	kill -9 `cat $PID_FILE`
+	kill -15 `cat $PID_FILE`
 elif [ "$1" = "rehash" ] ; then
 	echo "Rehashing UnrealIRCd"
 	if [ ! -r $PID_FILE ] ; then
Index: src/ircd.c
===================================================================
RCS file: /cvs/unreal/src/ircd.c,v
retrieving revision 1.1.1.1.6.1.2.190.2.54
diff -u -B -r1.1.1.1.6.1.2.190.2.54 ircd.c
--- src/ircd.c	8 Sep 2010 11:07:22 -0000	1.1.1.1.6.1.2.190.2.54
+++ src/ircd.c	31 Dec 2010 14:00:56 -0000
@@ -242,6 +242,7 @@
 #else
 	unload_all_modules();
 	flush_connections(&me);
+	unlink(IRCD_PIDFILE);
 	exit(-1);
 #endif
 }
Index: src/s_conf.c
===================================================================
RCS file: /cvs/unreal/src/s_conf.c,v
retrieving revision 1.1.1.1.6.1.2.355.2.118
diff -u -B -r1.1.1.1.6.1.2.355.2.118 s_conf.c
--- src/s_conf.c	29 Dec 2010 18:38:28 -0000	1.1.1.1.6.1.2.355.2.118
+++ src/s_conf.c	31 Dec 2010 14:00:58 -0000
@@ -1939,9 +1939,10 @@
 		if(old_pid_file &&
 		   strcmp(old_pid_file, conf_files->pid_file))
 			{
-				sendto_ops("pidfile is being rewritten to %s, please delete %s",
+				sendto_ops("pidfile is being rewritten to %s, deleting %s.",
 					   conf_files->pid_file,
 					   old_pid_file);
+				unlink(old_pid_file);
 				ircfree(old_pid_file);
 				
 				write_pidfile();
