Implemented an abstraction for extracting flags from builtins

This commit is contained in:
2025-03-22 20:10:47 -04:00
parent b6a9bb880d
commit e3f3e3dcdc
18 changed files with 567 additions and 17 deletions

View File

@@ -461,7 +461,6 @@ impl Job {
if child.pid == Pid::this() {
// TODO: figure out some way to get the exit code of builtins
let code = state::get_status();
flog!(DEBUG,code);
stats.push(WtStat::Exited(child.pid, code));
continue
}
@@ -621,9 +620,7 @@ pub fn wait_fg(job: Job) -> ShResult<()> {
attach_tty(job.pgid())?;
disable_reaping()?;
let statuses = write_jobs(|j| j.new_fg(job))?;
flog!(DEBUG,statuses);
for status in statuses {
flog!(DEBUG,status);
match status {
WtStat::Exited(_, exit_code) => {
code = exit_code;