[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog plugin/plugin.cpp plugin/plugin.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog plugin/plugin.cpp plugin/plugin.h |
Date: |
Fri, 08 Sep 2006 14:34:22 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/09/08 14:34:22
Modified files:
. : ChangeLog
plugin : plugin.cpp plugin.h
Log message:
* plugin/plugin.cpp, plugin/plugin.h: wait for child pid
(no more zombies). Avoid killing pid == -1 on gnash error !
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.814&r2=1.815
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.cpp?cvsroot=gnash&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.h?cvsroot=gnash&r1=1.19&r2=1.20
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.814
retrieving revision 1.815
diff -u -b -r1.814 -r1.815
--- ChangeLog 8 Sep 2006 14:32:01 -0000 1.814
+++ ChangeLog 8 Sep 2006 14:34:22 -0000 1.815
@@ -1,5 +1,10 @@
2006-09-08 Sandro Santilli <address@hidden>
+ * plugin/plugin.cpp, plugin/plugin.h: wait for child pid
+ (no more zombies). Avoid killing pid == -1 on gnash error !
+
+2006-09-08 Sandro Santilli <address@hidden>
+
* gui/gnash.cpp: FlashVars == flashvars (this is how the browser
sends parameters)
* plugin/plugin.cpp, plugin/plugin.h: added support for
Index: plugin/plugin.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- plugin/plugin.cpp 8 Sep 2006 14:32:01 -0000 1.49
+++ plugin/plugin.cpp 8 Sep 2006 14:34:22 -0000 1.50
@@ -69,6 +69,7 @@
#include <cstddef>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include <fcntl.h>
#include <cerrno>
#include <string>
@@ -305,6 +306,9 @@
{
if (_childpid) {
kill(_childpid, SIGINT);
+ int status;
+ waitpid(_childpid, &status, 0);
+ dbglogfile << "Child process exited with status " << status << endl;
}
_childpid = 0;
@@ -510,7 +514,7 @@
}
}
- _childpid = startProc(_swf_file.c_str(), _window);
+ _childpid = startProc(_swf_file, _window);
return NPERR_NO_ERROR;
}
@@ -540,7 +544,7 @@
}
int
-nsPluginInstance::startProc(string filespec, Window win)
+nsPluginInstance::startProc(const string& filespec, Window win)
{
string procname;
char *gnash_env = getenv("GNASH_PLAYER");
@@ -556,14 +560,14 @@
// See if the file actually exists, otherwise we can't spawn it
if (stat(procname.c_str(), &procstats) == -1) {
dbglogfile << "Invalid filename: " << procname << endl;
- return -1;
+ return 0;
}
_childpid = fork();
// childpid is -1, if the fork failed, so print out an error message
if (_childpid == -1) {
perror(strerror(errno));
- return -1;
+ return 0;
}
// childpid is a positive integer, if we are the parent, and
// fork() worked
Index: plugin/plugin.h
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- plugin/plugin.h 8 Sep 2006 13:59:17 -0000 1.19
+++ plugin/plugin.h 8 Sep 2006 14:34:22 -0000 1.20
@@ -93,7 +93,7 @@
NPError WriteStatus(char *msg) const;
NPError WriteStatus(std::string msg) const;
- int startProc(std::string filespec, Window win);
+ int startProc(const std::string& filespec, Window win);
private: