From: Ben Pfaff Date: Sat, 9 Jan 2021 06:20:26 +0000 (-0800) Subject: pspp-output: Don't write binary data to a terminal for dump-legacy-data. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=899e97f2730db331e3bce41c29f09d5f31164463;p=pspp pspp-output: Don't write binary data to a terminal for dump-legacy-data. --- diff --git a/utilities/pspp-output.c b/utilities/pspp-output.c index 6fdf48918a..d918496e8d 100644 --- a/utilities/pspp-output.c +++ b/utilities/pspp-output.c @@ -513,6 +513,9 @@ run_dump_legacy_data (int argc UNUSED, char **argv) if (err) error (1, 0, "%s", err); + if (raw && isatty (STDOUT_FILENO)) + error (1, 0, "not writing binary data to tty"); + struct spv_item **items; size_t n_items; spv_select (spv, criteria, n_criteria, &items, &n_items);