emersion / mrsh

A minimal POSIX shell
MIT License
492 stars 35 forks source link

Extra checks to ensure we don't clobber std fds #172

Closed caseman closed 3 years ago

caseman commented 3 years ago

Fix for https://github.com/emersion/mrsh/issues/171

Adds additional defensive checks when overriding stdin/stdout so they aren't inadvertently closed leading to "invalid file descriptor" errors.