Sfoglia il codice sorgente

Debugging of subprocesses

default_compile_flags
vector-of-bool 5 anni fa
parent
commit
b3f16faee6
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. +3
    -0
      src/dds/dds.main.cpp
  2. +2
    -1
      src/dds/proc.nix.cpp

+ 3
- 0
src/dds/dds.main.cpp Vedi File

@@ -455,6 +455,9 @@ struct cli_deps {
*/

int main(int argc, char** argv) {
#if DDS_DEBUG
spdlog::set_level(spdlog::level::debug);
#endif
spdlog::set_pattern("[%H:%M:%S] [%^%-5l%$] %v");
args::ArgumentParser parser("DDS - The drop-dead-simple library manager");


+ 2
- 1
src/dds/proc.nix.cpp Vedi File

@@ -3,7 +3,7 @@

#include <dds/util/signal.hpp>

#include <spdlog/fmt/fmt.h>
#include <spdlog/spdlog.h>

#include <poll.h>
#include <sys/wait.h>
@@ -62,6 +62,7 @@ spawn_child(const std::vector<std::string>& command, int stdout_pipe, int close_
} // namespace

proc_result dds::run_proc(const std::vector<std::string>& command) {
spdlog::debug("Spawning subprocess: {}", quote_command(command));
int stdio_pipe[2] = {};
auto rc = ::pipe(stdio_pipe);
check_rc(rc == 0, "Create stdio pipe for subprocess");

Loading…
Annulla
Salva