[xiph-commits] r18697 - icecast/branches/ph3/icecast/src

ph3-der-loewe at svn.xiph.org ph3-der-loewe at svn.xiph.org
Tue Nov 13 06:27:04 PST 2012


Author: ph3-der-loewe
Date: 2012-11-13 06:27:03 -0800 (Tue, 13 Nov 2012)
New Revision: 18697

Modified:
   icecast/branches/ph3/icecast/src/plugins.c
Log:
Fix building on win32 by not using signals

Modified: icecast/branches/ph3/icecast/src/plugins.c
===================================================================
--- icecast/branches/ph3/icecast/src/plugins.c	2012-11-13 14:19:56 UTC (rev 18696)
+++ icecast/branches/ph3/icecast/src/plugins.c	2012-11-13 14:27:03 UTC (rev 18697)
@@ -16,8 +16,6 @@
 #include <config.h>
 #endif
 
-#include <signal.h>
-
 #include "thread/thread.h"
 #include "roarapi.h"
 #include "plugins.h"
@@ -220,25 +218,22 @@
 
 // plugin API:
 // pcall = plugin call (think of syscalls ;)
-static int __pcall_send_sig(int sig) {
- int ret;
+static int _pcall_exit(int err) {
+ (void)err;
 
- roar_err_clear_all();
- ret = kill(getpid(), sig);
- roar_err_update();
+ global_lock();
+ global.running = ICE_HALTING;
+ global_unlock();
 
- if ( ret != 0 )
-  return -1;
  return 0;
 }
 
-static int _pcall_exit(int err) {
- (void)err;
- return __pcall_send_sig(SIGTERM);
-}
-
 static int _pcall_config_queue_reload(void) {
- return __pcall_send_sig(SIGHUP);
+ global_lock();
+ global.schedule_config_reread = 1;
+ global_unlock();
+
+ return 0;
 }
 
 static const struct {



More information about the commits mailing list