Implement app streams: stdio for apps (#640)

Implement file IO for applications to facilitate text input/output capturing.

Apps can now launch apps and:
- Read their stdio output
- Write to their stdio input
This commit is contained in:
Ken Van Hoeylandt
2026-08-30 12:07:40 +02:00
committed by GitHub
parent 64fb1a9f52
commit 6e5e35610b
20 changed files with 1540 additions and 10 deletions
+24
View File
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: Apache-2.0
#ifdef ESP_PLATFORM
#include <app/io.h>
#include <sys/types.h>
extern "C" {
ssize_t __wrap_read(int fd, void* buffer, size_t size) {
return app_io_read(fd, buffer, size);
}
ssize_t __wrap_write(int fd, const void* buffer, size_t size) {
return app_io_write(fd, buffer, size);
}
int __wrap_close(int fd) {
return app_io_close(fd);
}
}
#endif // ESP_PLATFORM