Commit e11a9a9a authored by Mathieu Giraud's avatar Mathieu Giraud

vidjil.cpp: handles SIGINT during second pass (clone analysis)

see #4286
parent 20060943
Pipeline #142849 passed with stages
in 102 minutes and 13 seconds
......@@ -1308,12 +1308,20 @@ int main (int argc, char **argv)
cout << " ==> " << out_seqdir + CLONE_FILENAME + "*" << "\t(detail, by clone)" << endl ;
cout << endl ;
global_interrupted = false;
signal(SIGINT, sigintHandler);
for (list <pair<junction,size_t> >::const_iterator it = sort_clones.begin();
it != sort_clones.end(); ++it) {
junction win = it->first;
size_t clone_nb_reads = it->second;
if (global_interrupted)
{
cout << WARNING_STRING << "Interrupted after analyzing " << num_clone << " clones" << endl ;
break;
}
++num_clone ;
bool clone_on_stdout = (num_clone <= CLONES_ON_STDOUT) || verbose;
......@@ -1537,6 +1545,7 @@ int main (int argc, char **argv)
cout << endl ;
out_clone.close();
} // end for clones
signal(SIGINT, SIG_DFL);
out_edges.close() ;
delete out_clones;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment