search for: input_push_file

Displaying 3 results from an estimated 3 matches for "input_push_file".

2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle -- in dotcmd
...21,15 +321,19 @@ dotcmd(int argc, char **argv) { int status = 0; - if (argc >= 2) { /* That's what SVR2 does */ + nextopt(nullstr); + argv = argptr; + + if (*argv) { char *fullname; - fullname = find_dot_file(argv[1]); + fullname = find_dot_file(*argv); setinputfile(fullname, INPUT_PUSH_FILE); commandname = fullname; status = cmdloop(0); popfile(); } + return status; }
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle -- in dotcmd
...21,15 +321,19 @@ dotcmd(int argc, char **argv) { int status = 0; - if (argc >= 2) { /* That's what SVR2 does */ + nextopt(nullstr); + argv = argptr; + + if (*argv) { char *fullname; - fullname = find_dot_file(argv[1]); + fullname = find_dot_file(*argv); setinputfile(fullname, INPUT_PUSH_FILE); commandname = fullname; status = cmdloop(0); popfile(); } + return status; }
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...e, O_RDONLY)) < 0) { @@ -436,11 +435,8 @@ setinputfile(const char *fname, int flags) goto out; sh_error("Can't open %s", fname); } - if (fd < 10) { - fd2 = copyfd(fd, 10); - close(fd); - fd = fd2; - } + if (fd < 10) + fd = savefd(fd); setinputfd(fd, flags & INPUT_PUSH_FILE); out: INTON; diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c index 77ed779..7e38048 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -188,18 +188,14 @@ setjobctl(int on) if (on == jobctl || rootshell == 0) return; if (on) { - int ofd; - ofd = fd = open(_PATH_TTY, O_RDWR); + fd = o...