(unix/C) “stty: stdin isn't a terminal” when using system() function
问题 We're reading a file from stdin into file_buffer , and then stepping into a method more . As soon as we use system("stty cbreak -echo"); , the output prints "stty: stdin isn't a terminal" and doesn't set our terminal to the settings we asked for. This problem only exists when we use standard in. If we use a file argument, the program works fine -- the terminal settings get set, and there is no error message. So, this is okay: myprogram file1.txt But this is not: myprogram < file1.txt Either