> > I'm using the Cancel methods on ctrl+c but the terminal is anyway messed up. > > Would it be worth a bug report? > > No. The pinentry is background process and there is no portable way to save > and restore the screen. Thus your application may want to do something like > this after a gpgme operation: > > if ((s = gpgme_get_ctx_flag (ctx, "redraw")) && *s) > fputs ("Screen redraw suggested\n", stdout); >
I implemented as suggested. And yes this makes it possible to type again, but the pinentry still running in the background and if you hit enter two times it comes back and the terminal acts weird. See screenshots gpgme_error_t err = gpgme_cancel(_ctx); const char* s; if (( s = gpgme_get_ctx_flag (_ctx, "redraw")) && *s) if (!system("reset")) log(LOG_ERR, "Could not reset terminal. Reset Terminal suggested"); fail_if_err(err); _ctx = gpgme_wait(_ctx, &err, false); fail_if_err(err); gpgme_release(_ctx); There must be a possibility to proper kill the pinentry Regards Sven
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org https://lists.gnupg.org/mailman/listinfo/gnupg-users