Browse Source

2009-07-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Avoid to create zombie process when commands specified in
	--on-download-* options are executed. Tested on Linux 2.6, Mac OS
	X and NetBSD.	
	* src/main.cc
Tatsuhiro Tsujikawa 16 năm trước cách đây
mục cha
commit
757e758fa1
2 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 7 0
      ChangeLog
  2. 3 0
      src/main.cc

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2009-07-16  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Avoid to create zombie process when commands specified in
+	--on-download-* options are executed. Tested on Linux 2.6, Mac OS
+	X and NetBSD.	
+	* src/main.cc
+
 2009-07-15  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Fixed typo

+ 3 - 0
src/main.cc

@@ -212,6 +212,9 @@ downloadresultcode::RESULT main(int argc, char* argv[])
 #ifdef SIGPIPE
     Util::setGlobalSignalHandler(SIGPIPE, SIG_IGN, 0);
 #endif
+#ifdef SIGCHLD
+    Util::setGlobalSignalHandler(SIGCHLD, SIG_IGN, 0);
+#endif // SIGCHILD
     std::deque<SharedHandle<RequestGroup> > requestGroups;
 #ifdef ENABLE_BITTORRENT
     if(!op->blank(PREF_TORRENT_FILE)) {