You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/11/04 02:28:32 UTC
svn commit: r1405445 - in /incubator/mesos/branches/0.10.0/src:
slave/process_based_isolation_module.cpp webui/webui.cpp
Author: benh
Date: Sun Nov 4 01:28:31 2012
New Revision: 1405445
URL: http://svn.apache.org/viewvc?rev=1405445&view=rev
Log:
*** MODIFIED FOR 0.10.0 ***
Made sure to check the return value of 'pipe'.
Modified:
incubator/mesos/branches/0.10.0/src/slave/process_based_isolation_module.cpp
incubator/mesos/branches/0.10.0/src/webui/webui.cpp
Modified: incubator/mesos/branches/0.10.0/src/slave/process_based_isolation_module.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/branches/0.10.0/src/slave/process_based_isolation_module.cpp?rev=1405445&r1=1405444&r2=1405445&view=diff
==============================================================================
--- incubator/mesos/branches/0.10.0/src/slave/process_based_isolation_module.cpp (original)
+++ incubator/mesos/branches/0.10.0/src/slave/process_based_isolation_module.cpp Sun Nov 4 01:28:31 2012
@@ -110,7 +110,9 @@ void ProcessBasedIsolationModule::launch
// Use pipes to determine which child has successfully changed session.
int pipes[2];
- pipe(pipes);
+ if (pipe(pipes) < 0) {
+ PLOG(FATAL) << "Failed to create a pipe";
+ }
// Set the FD_CLOEXEC flags on these pipes
Try<bool> result = os::cloexec(pipes[0]);
Modified: incubator/mesos/branches/0.10.0/src/webui/webui.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/branches/0.10.0/src/webui/webui.cpp?rev=1405445&r1=1405444&r2=1405445&view=diff
==============================================================================
--- incubator/mesos/branches/0.10.0/src/webui/webui.cpp (original)
+++ incubator/mesos/branches/0.10.0/src/webui/webui.cpp Sun Nov 4 01:28:31 2012
@@ -96,7 +96,9 @@ void start(const std::string& directory,
// exit the process).
int pipes[2];
- pipe(pipes);
+ if (pipe(pipes) < 0) {
+ PLOG(FATAL) << "Failed to create a pipe";
+ }
// Set the FD_CLOEXEC flags on these pipes
Try<bool> result = os::cloexec(pipes[0]);