Displaying 11 results from an estimated 11 matches for "shellexec".
Did you mean:
shell_exec
2020 Mar 28
0
[klibc:update-dash] dash: exec: Return 126 on most errors in shellexec
...h=2cb3d00d728a1ebfe87818161b7a13dc2b6598ed
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Sat, 19 May 2018 02:39:37 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:55 +0000
[klibc] dash: exec: Return 126 on most errors in shellexec
[ dash commit a332ebdaa13d3eaf70082e1be214c42645bc186a ]
Currently when shellexec fails on most errors the shell will exit
with exit status 2. This patch changes it to 126 in order to avoid
ambiguities with the exit status from a successful exec.
The errors that result in 127 has also been expa...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...2,10 +892,8 @@ bail:
/* Fork off a child process if necessary. */
if (!(flags & EV_EXIT) || have_traps()) {
INTOFF;
- jp = makejob(cmd, 1);
- if (forkshell(jp, cmd, FORK_FG) != 0)
- break;
- FORCEINTON;
+ jp = vforkexec(cmd, argv, path, cmdentry.u.index);
+ break;
}
shellexec(argv, path, cmdentry.u.index);
/* NOTREACHED */
diff --git a/usr/dash/exec.h b/usr/dash/exec.h
index 2b318257..423b07e6 100644
--- a/usr/dash/exec.h
+++ b/usr/dash/exec.h
@@ -58,6 +58,8 @@ struct cmdentry {
#define DO_ALTPATH 0x08 /* using alternate path */
#define DO_REGBLTIN 0x10 /* regular...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Only restore exit status on exit/return
...= 0;
}
#endif
@@ -318,7 +319,7 @@ out:
if (flags & EV_EXIT) {
exexit:
- exraise(EXEXIT);
+ exraise(EXEND);
}
popstackmark(&smark);
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index 9d0215a6..87354d49 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -143,7 +143,7 @@ shellexec(char **argv, const char *path, int idx)
exitstatus = exerrno;
TRACE(("shellexec failed for %s, errno %d, suppressint %d\n",
argv[0], e, suppressint ));
- exerror(EXEXIT, "%s: %s", argv[0], errmsg(e, E_EXEC));
+ exerror(EXEND, "%s: %s", argv[0], errmsg(e, E_EXEC)...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Do not allocate stack string in padvance
...p = stalloc(len);
+
if (stat(p, &statb) >= 0 && S_ISDIR(statb.st_mode)) {
if (c && c != ':')
flags |= CD_PRINT;
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index c98f14c0..04ee2ba9 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -118,13 +118,13 @@ shellexec(char **argv, const char *path, int idx)
e = errno;
} else {
e = ENOENT;
- while ((cmdname = padvance(&path, argv[0])) != NULL) {
+ while (padvance(&path, argv[0]) >= 0) {
+ cmdname = stackblock();
if (--idx < 0 && pathopt == NULL) {
tryexec(cmdname, argv,...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
....cmd == EXECCMD;
if (likely(cmdentry.u.cmd != COMMANDCMD))
@@ -798,6 +804,9 @@ evalcommand(union node *cmd, int flags)
for (sp = arglist.list; sp; sp = sp->next)
argc++;
+
+ if (execcmd && argc > 1)
+ vflags = VEXPORT;
}
/* Reserve one extra spot at the front for shellexec. */
@@ -818,7 +827,8 @@ evalcommand(union node *cmd, int flags)
redir_stop = pushredir(cmd->ncmd.redirect);
status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);
- if (status) {
+ if (unlikely(status)) {
+ vlocal = 0;
bail:
exitstatus = status;
@@ -829,13 +839,19 @...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Always set localvar_stop
...diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 7bb636e1..6652ccc0 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -809,6 +809,8 @@ evalcommand(union node *cmd, int flags)
vflags = VEXPORT;
}
+ localvar_stop = pushlocalvars(vlocal);
+
/* Reserve one extra spot at the front for shellexec. */
nargv = stalloc(sizeof (char *) * (argc + 2));
argv = ++nargv;
@@ -828,7 +830,6 @@ evalcommand(union node *cmd, int flags)
status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);
if (unlikely(status)) {
- vlocal = 0;
bail:
exitstatus = status;
@@ -839,9 +840,6 @...
2009 Apr 25
6
Problem with parameter from Tux to win
Hi,
I use K-Meleon under wine as browser, and Thunderbird (linux version) as mail client.
When I click on a link in Thunderbird, K-Meleon is opened, but the parameter isn't sent, instead of it I have just '%u', the parameter I have put on the line in default programs to say to pass the real parameter.
K-Meleon receive %u and modify the address to http://www.%u.com/
Is it a
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...MDBUILTIN && builtinloc > 0)) {
*pp = cmdp->next;
ckfree(cmdp);
} else {
diff --git a/usr/dash/exec.h b/usr/dash/exec.h
index e241b742..f394f3f7 100644
--- a/usr/dash/exec.h
+++ b/usr/dash/exec.h
@@ -62,7 +62,7 @@ extern const char *pathopt; /* set by padvance */
void shellexec(char **, const char *, int)
__attribute__((__noreturn__));
-int padvance(const char **, const char *);
+int padvance_magic(const char **path, const char *name, int magic);
int hashcmd(int, char **);
void find_command(char *, struct cmdentry *, int, const char *);
struct builtincmd *find_bui...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...rse_command_args(argv, &path);
- if (!nargv)
- break;
- argc -= nargv - argv;
- argv = nargv;
- cmd_flag |= DO_NOFUNC;
+ goto bail;
}
}
@@ -864,6 +882,7 @@ bail:
FORCEINTON;
}
listsetvar(varlist.list, VEXPORT|VSTACK);
+ path = unlikely(path) ? path : pathval();
shellexec(argv, path, cmdentry.u.index);
/* NOTREACHED */
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index 6c0a64f6..9d0215a6 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -357,11 +357,8 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
}
updatetbl = (path...
2011 Oct 21
0
Wine release 1.3.31
...e from MMDevAPI.
winecoreaudio.drv: Don't fail if setting volume fails.
winealsa.drv: Fix invalid pointer dereference on error path.
dsound: Fix type conversion problems.
dsound: Don't make the capture buffer object address public until it is prepared.
shell32: ShellExec with empty operation should behave same as with NULL operation.
dsound: Don't claim to support hardware buffers.
dsound: Always enumerate the default device first.
Andrew Talbot (7):
windowscodecs: Mark some fall-throughs in switch statements.
winealsa.drv: Add some ret...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...exec or in setinputfd.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: maximilian attems <max at stro.at>
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index c55683d..8a1f722 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -110,7 +110,6 @@ shellexec(char **argv, const char *path, int idx)
char **envp;
int exerrno;
- clearredir(1);
envp = environment();
if (strchr(argv[0], '/') != NULL) {
tryexec(argv[0], argv, envp);
diff --git a/usr/dash/input.c b/usr/dash/input.c
index 7f99d4a..11f7a3f 100644
--- a/usr/dash/input.c
+++ b...