Added signal catching and handling in C and Cython
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include "obidms.h"
|
||||
#include "obidebug.h"
|
||||
#include "obierrno.h"
|
||||
#include "obisig.h"
|
||||
#include "obitypes.h"
|
||||
#include "obiview.h"
|
||||
#include "obidmscolumn.h"
|
||||
@ -273,6 +274,8 @@ int obi_ecotag(const char* dms_name,
|
||||
buffer_size = 1024;
|
||||
best_match_ids_buffer_size = 1024;
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
// Open main DMS containing the query sequences and where the output will be written
|
||||
dms = obi_open_dms(dms_name, false);
|
||||
if (dms == NULL)
|
||||
@ -471,6 +474,9 @@ int obi_ecotag(const char* dms_name,
|
||||
|
||||
for (j=0; j < ref_count; j++)
|
||||
{
|
||||
if (! keep_running)
|
||||
return -1;
|
||||
|
||||
// Get reference sequence and its index
|
||||
ref_seq_idx = obi_get_index_with_elt_idx_and_col_p_in_view(ref_view, ref_seq_column, j, 0);
|
||||
blob2 = obi_get_blob_with_elt_idx_and_col_p_in_view(ref_view, ref_seq_column, j, 0);
|
||||
|
Reference in New Issue
Block a user