Ver código fonte

make --run ignore SIGINT

feature/new-parser
Martin Dørum 5 anos atrás
pai
commit
6381bfb785
3 arquivos alterados com 6 adições e 0 exclusões
  1. 1
    0
      cmd/main.cc
  2. 4
    0
      lib/sys.cc
  3. 1
    0
      lib/sys.h

+ 1
- 0
cmd/main.cc Ver arquivo

@@ -103,6 +103,7 @@ static void run(Conf conf) {
argv.push_back(std::move(arg));
}
try {
sys::ignoreCtrlC();
sys::execute(argv, true);
} catch (std::exception &ex) {
logger::log(ex.what());

+ 4
- 0
lib/sys.cc Ver arquivo

@@ -299,4 +299,8 @@ std::string dirname(const std::string &path) {
return std::string(dir);
}

void ignoreCtrlC() {
signal(SIGINT, SIG_IGN);
}

}

+ 1
- 0
lib/sys.h Ver arquivo

@@ -29,5 +29,6 @@ void chdir(const std::string &path);
std::string cwd();
void symlink(const std::string &from, const std::string &to);
std::string dirname(const std::string &path);
void ignoreCtrlC();

}

Carregando…
Cancelar
Salvar