ncdirect: drop signals in ncdirect_stop_minimal

pull/1279/head
nick black 4 years ago
parent 21f6b5fc8a
commit 4427713f0f
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -595,7 +595,7 @@ int get_controlling_tty(FILE* ttyfp){
static int static int
ncdirect_stop_minimal(void* vnc){ ncdirect_stop_minimal(void* vnc){
ncdirect* nc = static_cast<ncdirect*>(vnc); ncdirect* nc = static_cast<ncdirect*>(vnc);
int ret = 0; int ret = drop_signals(nc);
if(nc->tcache.op && term_emit("op", nc->tcache.op, nc->ttyfp, true)){ if(nc->tcache.op && term_emit("op", nc->tcache.op, nc->ttyfp, true)){
ret = -1; ret = -1;
} }
@ -681,6 +681,7 @@ err:
tcsetattr(ret->ctermfd, TCSANOW, &ret->tpreserved); tcsetattr(ret->ctermfd, TCSANOW, &ret->tpreserved);
} }
} }
drop_signals(ret);
delete(ret); delete(ret);
return nullptr; return nullptr;
} }

@ -58,8 +58,7 @@ reset_term_attributes(notcurses* nc){
static int static int
notcurses_stop_minimal(void* vnc){ notcurses_stop_minimal(void* vnc){
notcurses* nc = vnc; notcurses* nc = vnc;
int ret = 0; int ret = drop_signals(nc);
drop_signals(nc);
// be sure to write the restoration sequences *prior* to running rmcup, as // be sure to write the restoration sequences *prior* to running rmcup, as
// they apply to the screen (alternate or otherwise) we're actually using. // they apply to the screen (alternate or otherwise) we're actually using.
ret |= reset_term_attributes(nc); ret |= reset_term_attributes(nc);

Loading…
Cancel
Save