trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject svn commit: r1236981 - /trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc
Date Sat, 28 Jan 2012 05:21:39 GMT
Author: jpeach
Date: Sat Jan 28 05:21:39 2012
New Revision: 1236981

URL: http://svn.apache.org/viewvc?rev=1236981&view=rev
Log:
TS-1097: Ignore system(3) return code harder

Modified:
    trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc

Modified: trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc?rev=1236981&r1=1236980&r2=1236981&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc (original)
+++ trafficserver/traffic/trunk/mgmt/cli/CliCreateCommands.cc Sat Jan 28 05:21:39 2012
@@ -283,6 +283,14 @@ struct replace_colon
   }
 };
 
+static int
+xsystem(const char * cmd)
+{
+  // Some versions of glibc declare system(3) with the warn_unused_result
+  // attribute. Pretend to use the return value so it will shut the hell up.
+  return system(cmd);
+}
+
 int
 Cmd_Help(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
 {
@@ -310,7 +318,7 @@ Cmd_Help(ClientData clientData, Tcl_Inte
       << Layout::get()->datadir << "/trafficshell/" << topic <<
".1";
 
     Cli_Debug("%s\n", cmd.str().c_str());
-    (void)system(cmd.str().c_str());
+    xsystem(cmd.str().c_str());
   }
 
   return CMD_OK;



Mime
View raw message