Skip to content

Commit

Permalink
set status to NOT_RUNNING before exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboud committed Mar 23, 2021
1 parent 6f689f0 commit dc5a4c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void sig_hdlr(int signum){
signal_handling::crawler_->write_last_rctime();
signal_handling::crawler_->delete_snap();
}
Status::status.set(Status::NOT_RUNNING);
switch(signum){
case SIGINT:
case SIGTERM:
Expand Down
3 changes: 2 additions & 1 deletion src/signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#pragma once

#include "rctime.hpp"
#include "status.hpp"

class Crawler;

Expand All @@ -36,5 +37,5 @@ namespace signal_handling{
}

namespace l{
void exit(int num, int status = 1);
void exit(int num, int status = Status::NOT_RUNNING);
}

0 comments on commit dc5a4c5

Please sign in to comment.