fix stdin redirection issue - release

This commit is contained in:
philippe44
2023-08-11 18:12:52 -07:00
parent 4f5fc90f4b
commit d7706e5608

View File

@@ -313,8 +313,8 @@ void initialize_console() {
vfs.open = stdin_dummy;
vfs.read = stdin_read;
ESP_ERROR_CHECK(esp_vfs_register("/dev/console", &vfs, NULL));
freopen("/dev/console", "r", stdin);
ESP_ERROR_CHECK(esp_vfs_register("/dev/redirect", &vfs, NULL));
freopen("/dev/redirect", "r", stdin);
/* Disable buffering on stdin */
setvbuf(stdin, NULL, _IONBF, 0);