Skip to content

Commit

Permalink
interp: umask/fg/bg shouldn't panic (#999)
Browse files Browse the repository at this point in the history
This fixes an issue where running `umask`, `fg` or `bg` causes a panic.

Related issue: diamondburned/libdb.so#3
  • Loading branch information
diamondburned authored May 9, 2023
1 parent d321358 commit 3fb46eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion interp/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,8 @@ func (r *Runner) builtinCode(ctx context.Context, pos syntax.Pos, name string, a

default:
// "umask", "fg", "bg",
panic(fmt.Sprintf("unhandled builtin: %s", name))
r.errf("%s: unimplemented builtin\n", name)
return 2
}
return 0
}
Expand Down

0 comments on commit 3fb46eb

Please sign in to comment.