OSDN Git Service

axfer: check whether a terminal is referred for stdio
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 5 Dec 2018 01:25:04 +0000 (10:25 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 5 Dec 2018 14:29:51 +0000 (15:29 +0100)
commitbae5761d72f5488616c45fe4f6b32df42c8f5797
tree222e4e0a776898d4dd865eb875d11fce82482cc8
parentb8833717bb9b7a392a37abf1671d2ff55575926e
axfer: check whether a terminal is referred for stdio

A reference to a terminal for standard input/output brings some
troubles. For capture transmission, it can bring some terminal
control codes and it's possible to make the terminal in disorder.
For playback transmission, it can bring endless loop to read
data for detection of type of container.

This commit checks whether a terminal is referred for the standard
input/output by a call isatty(3). When detecting a terminal,
axfer run time prints message and goes to finish.

Suggested-by: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
axfer/container.c