summaryrefslogtreecommitdiff
path: root/usr.bin/signify/signify.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2015-11-02 22:01:11 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2015-11-02 22:01:11 +0000
commitdc0eeb783160b8facd58fc5d85fe14fdf2d2e9fc (patch)
treeea1cec51fe463250a7929146c9e2b0a082670a5f /usr.bin/signify/signify.c
parentf1c4e153fedc85347ddf7b928a514cb761d858bf (diff)
Make signify's stdout line buffered. This allows to run the verbose
output through a pipe and still see the progress immediately. OK tedu@
Diffstat (limited to 'usr.bin/signify/signify.c')
-rw-r--r--usr.bin/signify/signify.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c
index c1ed54d6bce..3bc4c6c9951 100644
--- a/usr.bin/signify/signify.c
+++ b/usr.bin/signify/signify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signify.c,v 1.103 2015/10/30 01:57:43 tedu Exp $ */
+/* $OpenBSD: signify.c,v 1.104 2015/11/02 22:01:10 bluhm Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -724,6 +724,9 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
+ if (setvbuf(stdout, NULL, _IOLBF, 0) != 0)
+ err(1, "setvbuf");
+
switch (verb) {
case GENERATE:
case SIGN: