Skip to content

Commit

Permalink
Skip utmp removal with piped IO on stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-stephenson committed Nov 3, 2020
1 parent b4b44ab commit 353684f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tlog/tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ tlog_tap_teardown(struct tlog_errs **perrs,
tlog_source_destroy(tap->source);
tap->source = NULL;

if (tap->in_fd >= 0) {
if ((tap->in_fd >= 0) && (isatty(tap->in_fd))) {
#ifdef HAVE_UTEMPTER
if (utempter_remove_record(tap->in_fd) == 0) {
grc = TLOG_GRC_ERRNO;
Expand Down

0 comments on commit 353684f

Please sign in to comment.