[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1976-gad0b3ef |
Date: |
Mon, 12 May 2014 10:40:41 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via ad0b3eff349049734afcfa4c1c06fa3a2d6d2815 (commit)
from 7d7cce0fd1bbe51f660c0e129ef3dd37acc98100 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=ad0b3eff349049734afcfa4c1c06fa3a2d6d2815
commit ad0b3eff349049734afcfa4c1c06fa3a2d6d2815
Author: Bastiaan Jacques <address@hidden>
Date: Mon May 12 10:31:50 2014 +0200
Refactor.
diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index 86150b9..5dcb5b1 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -1420,32 +1420,18 @@ nsPluginInstance::startProc()
// If we are the parent and fork() worked, childpid is a positive integer.
if (_childpid > 0) {
// Close the child's end of the pipes.
- ret = close(p2c_controlpipe[0]);
- if (ret == -1) {
- gnash::log_error("p2c_controlpipe[0] close() failed: %s",
- strerror(errno));
- }
-
- // we want to write to p2c pipe, so close read-fd0
- ret = close (p2c_pipe[0]);
- if (ret == -1) {
- // this is not really a fatal error, so continue best as we can
- gnash::log_error("p2c_pipe[0] close() failed: %s",
- strerror(errno));
- }
-
- // we want to read from c2p pipe, so close read-fd1
- ret = close (c2p_pipe[1]);
- if (ret == -1) {
+ int fdstoclose[] = {p2c_controlpipe[0], p2c_pipe[0], c2p_pipe[1]};
+ int num_failed = std::count_if(fdstoclose, fdstoclose+3, close);
+
+ if (num_failed > 0) {
// this is not really a fatal error, so continue best as we can
- gnash::log_error("c2p_pipe[1] close() failed: %s",
- strerror(errno));
- gnash::log_debug("Forked successfully but with ignorable errors.");
- } else {
- gnash::log_debug("Forked successfully, child process PID is %d",
- _childpid);
+ gnash::log_error("%d fds failed to close: %s (error ignored).",
+ num_failed, strerror(errno));
}
+ gnash::log_debug("Forked successfully, child process PID is %d",
+ _childpid);
+
if (!cookiefile.empty()) {
cookiemap.insert(std::make_pair(_childpid, cookiefile));
gnash::log_debug("Pid %d associated with cookiefile %s",
-----------------------------------------------------------------------
Summary of changes:
plugin/npapi/plugin.cpp | 32 +++++++++-----------------------
1 files changed, 9 insertions(+), 23 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1976-gad0b3ef,
Bastiaan Jacques <=