diff options
| author | Marcelo Fernandez | 2017-10-03 15:09:04 -0300 |
|---|---|---|
| committer | Marcelo Fernandez | 2017-10-03 15:09:04 -0300 |
| commit | 4b695c3bdf562d55fb617a6c48eb5c1701b81325 (patch) | |
| tree | 22bc1b017d147e7b85f744ec03410f509e001df2 /drivers/unix/os_unix.cpp | |
| parent | c5ab18f33e34b49b0603382af4af5e3fcd18c4ed (diff) | |
| download | godot-4b695c3bdf562d55fb617a6c48eb5c1701b81325.tar.gz godot-4b695c3bdf562d55fb617a6c48eb5c1701b81325.tar.zst godot-4b695c3bdf562d55fb617a6c48eb5c1701b81325.zip | |
Diffstat (limited to 'drivers/unix/os_unix.cpp')
| -rw-r--r-- | drivers/unix/os_unix.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 29fe73f17..e0a62b316 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -285,7 +285,7 @@ uint64_t OS_Unix::get_ticks_usec() const { return longtime; } -Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode) { +Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) { if (p_blocking && r_pipe) { @@ -297,7 +297,11 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo argss += String(" \"") + p_arguments[i] + "\""; } - argss += " 2>/dev/null"; //silence stderr + if (read_stderr) { + argss += " 2>&1"; // Read stderr too + } else { + argss += " 2>/dev/null"; //silence stderr + } FILE *f = popen(argss.utf8().get_data(), "r"); ERR_FAIL_COND_V(!f, ERR_CANT_OPEN); |
