Fixing argparse issue and populating stdin file
This commit is contained in:
@@ -131,6 +131,7 @@ namespace daggy::executors::task {
|
|||||||
env[0] = empty;
|
env[0] = empty;
|
||||||
|
|
||||||
char script[] = "#!/bin/bash\n$@\n";
|
char script[] = "#!/bin/bash\n$@\n";
|
||||||
|
char stdinFile[] = "/dev/null";
|
||||||
|
|
||||||
// taken from slurm
|
// taken from slurm
|
||||||
int error_code;
|
int error_code;
|
||||||
@@ -153,7 +154,7 @@ namespace daggy::executors::task {
|
|||||||
jd.argc = argv.size();
|
jd.argc = argv.size();
|
||||||
// TODO figure out the script to run
|
// TODO figure out the script to run
|
||||||
jd.script = script;
|
jd.script = script;
|
||||||
jd.std_in = empty;
|
jd.std_in = stdinFile;
|
||||||
jd.std_err = const_cast<char *>(stderrFile.c_str());
|
jd.std_err = const_cast<char *>(stderrFile.c_str());
|
||||||
jd.std_out = const_cast<char *>(stdoutFile.c_str());
|
jd.std_out = const_cast<char *>(stdoutFile.c_str());
|
||||||
jd.work_dir = const_cast<char *>(workDir.c_str());
|
jd.work_dir = const_cast<char *>(workDir.c_str());
|
||||||
@@ -243,4 +244,4 @@ namespace daggy::executors::task {
|
|||||||
return record;
|
return record;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#include <argparse/argparse.hpp>
|
#include <argparse.hpp>
|
||||||
|
|
||||||
#include <pistache/client.h>
|
#include <pistache/client.h>
|
||||||
#include <rapidjson/document.h>
|
#include <rapidjson/document.h>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include <argparse/argparse.hpp>
|
#include <argparse.hpp>
|
||||||
|
|
||||||
#include <daggy/Server.hpp>
|
#include <daggy/Server.hpp>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user