Implemented the exec builtin

Fixed readline and terminal interactions using stdin instead of /dev/tty
This commit is contained in:
2026-02-20 12:17:48 -05:00
parent 2184b9b361
commit 129390c2da
16 changed files with 384 additions and 41 deletions

View File

@@ -198,6 +198,11 @@ impl JobTab {
let registered_fd = RegisteredFd { fd, owner_pid };
self.fd_registry.push(registered_fd)
}
/// Close all registered proc sub fds. Called after fork in exec_cmd
/// so the parent doesn't hold pipe ends that prevent EOF.
pub fn drain_registered_fds(&mut self) {
self.fd_registry.clear();
}
fn prune_jobs(&mut self) {
while let Some(job) = self.jobs.last() {
if job.is_none() {