Salome HOME
Integrated patch from Ivan Dutka-Malen:
authorbarate <barate>
Wed, 14 Apr 2010 13:45:01 +0000 (13:45 +0000)
committerbarate <barate>
Wed, 14 Apr 2010 13:45:01 +0000 (13:45 +0000)
Take into account special input and output file names "stdin", "stdout" and "stderr" in BatchManager_Local (not done in other batch managers yet).

src/Local/Batch_BatchManager_Local.cxx

index 5cc3b23c226fcd3c18f210c871603b3733d0750e..e9797fc8e627021b0f161e21de0a9e2d6a5e4519 100644 (file)
@@ -274,6 +274,26 @@ namespace Batch {
       }
     }
 
+    if (param.find(INFILE) != param.end()) {
+      Versatile V = param[INFILE];
+      for(Versatile::const_iterator it=V.begin(); it!=V.end(); it++) {
+        Couple cpl = * static_cast<CoupleType*>(*it);
+        string remote = cpl.getRemote();
+        if (remote == "stdin")
+        exec_sub_cmd << " <stdin";
+      }
+    }
+
+    if (param.find(OUTFILE) != param.end()) {
+      Versatile V = param[OUTFILE];
+      for(Versatile::const_iterator it=V.begin(); it!=V.end(); it++) {
+        Couple cpl = * static_cast<CoupleType*>(*it);
+        string remote = cpl.getRemote();
+        if (remote == "stdout") exec_sub_cmd << " 1>stdout";
+        if (remote == "stderr") exec_sub_cmd << " 2>stderr";
+      }
+    }
+
     string user;
     Parametre::const_iterator it = param.find(USER);
     if (it != param.end()) {