Closed luodeb closed 5 months ago
不是python特有问题。在starry运行下面程序,输入“123\n”,无显示;按ctrl+enter有显示。在alpine上一切正常。
int main(int argc, char *argv[]) { char input[100]; fgets(input, 100, stdin); printf("Hello, %s", input); return 0; }
如果只有printf,输出正常。看起来像是stdin相关的问题
通过一些小workaround,可以实现回显,并按enter后正常执行代码,但是终究只是权宜之计,可能是Starry的设计缺陷。
这个现象比较奇怪,怀疑可能是哪个设置导致按Ctrl+Enter才执行。不过python语句执行没有问题,只是输入不能回显。也可能是syscall的问题
优先级低。