Parcourir la source

make --run ignore SIGINT

feature/new-parser
Martin Dørum il y a 5 ans
Parent
révision
6381bfb785
3 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 1
    0
      cmd/main.cc
  2. 4
    0
      lib/sys.cc
  3. 1
    0
      lib/sys.h

+ 1
- 0
cmd/main.cc Voir le fichier

@@ -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 Voir le fichier

@@ -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 Voir le fichier

@@ -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();

}

Chargement…
Annuler
Enregistrer