diff options
author | Fredrik Salomonsson <plattfot@gmail.com> | 2018-11-04 20:19:13 -0800 |
---|---|---|
committer | Fredrik Salomonsson <plattfot@gmail.com> | 2018-11-04 20:19:13 -0800 |
commit | 2d6b58594c283443a20083fef5b664e1c49a00d7 (patch) | |
tree | 5accb12f4f105fe46ae31c0f7ffc2364f0433d07 | |
parent | 0f5bf04450ab2f6dac0820a720eb04a0d13081a3 (diff) | |
download | pinentry-rofi-2d6b58594c283443a20083fef5b664e1c49a00d7.tar.gz |
Forcing the output0.2.0
-rwxr-xr-x | rofi-pinentry.scm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/rofi-pinentry.scm b/rofi-pinentry.scm index 89fb2c5..e897262 100755 --- a/rofi-pinentry.scm +++ b/rofi-pinentry.scm @@ -76,7 +76,8 @@ touch-file=/run/user/1000/gnupg/S.gpg-agent" (let ((info (match:substring regex-match 1))) (cond ((string=? info "pid") - (format #t "D ~a\n" (getpid)))))) + (format #t "D ~a\n" (getpid)) + (force-output))))) regex-match)) (define (pinentry-setkeyinfo pinentry line) @@ -115,9 +116,11 @@ touch-file=/run/user/1000/gnupg/S.gpg-agent" (status (close-pipe pipe))) (if status (unless (string-empty? pass) - (format #t "D ~a" pass)) + (format #t "D ~a" pass) + (force-output)) (begin (format #t "ERR 83886179 Operation cancelled <rofi>\n") + (force-output) (set-pinentry-ok! pinentry #f))))) regex-match)) @@ -139,11 +142,16 @@ touch-file=/run/user/1000/gnupg/S.gpg-agent" ((pinentry-setprompt pinentry line)) ((pinentry-getpin pinentry line)) ((pinentry-bye pinentry line)) - (#t (begin (format #t "BYE\n") (exit #f)))) + (#t (begin + (format #t "BYE\n") + (force-output) + (exit #f)))) (pinentry-loop pinentry input-port)))) (let ((pinentry (make-pinentry #t "Passphrase:" "" #f))) (format #t "OK Please go ahead\n") + (force-output) (pinentry-loop pinentry (current-input-port)) (when (pinentry-ok pinentry) - (format #t "OK\n"))) + (format #t "OK\n") + (force-output))) |