luodeb / Starry

An experimental modular OS written in Rust.
http://rcore-os.cn/arceos/
Apache License 2.0
1 stars 2 forks source link

启动starry后,cd python3.11。运行/bin/python3.11,进入python后输入命令,无回显,只能ctrl+enter执行命令 #1

Closed luodeb closed 5 months ago

cairami commented 5 months ago

这个现象比较奇怪,怀疑可能是哪个设置导致按Ctrl+Enter才执行。不过python语句执行没有问题,只是输入不能回显。也可能是syscall的问题

优先级低。

cairami commented 5 months ago

不是python特有问题。在starry运行下面程序,输入“123\n”,无显示;按ctrl+enter有显示。在alpine上一切正常。

include

int main(int argc, char *argv[]) { char input[100]; fgets(input, 100, stdin); printf("Hello, %s", input); return 0; }

如果只有printf,输出正常。看起来像是stdin相关的问题

luodeb commented 5 months ago

通过一些小workaround,可以实现回显,并按enter后正常执行代码,但是终究只是权宜之计,可能是Starry的设计缺陷。