diff options
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/zle_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 6c271b5d0..be2b062b0 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -1485,6 +1485,13 @@ execzlefunc(Thingy func, char **args, int set_bindk) int inuse = w->flags & WIDGET_INUSE; w->flags |= WIDGET_INUSE; + if (osi > 0) { + /* + * Many commands don't like having a closed stdin, open on + * /dev/null instead + */ + open("/dev/null", O_RDWR | O_NOCTTY); /* ignore failure */ + } if (*args) { largs = newlinklist(); addlinknode(largs, dupstring(w->u.fnnam)); |