aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-21 01:26:42 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-21 01:26:42 +0100
commit7426920461738367205e3d08649c827c747bd93d (patch)
tree8e5b59c8ecb5c0bd365c6cfaba3250089cce45de /shell
parent00ddd44cdad8142c6bb836efbfde9f38fa31b899 (diff)
downloadbusybox-w32-7426920461738367205e3d08649c827c747bd93d.tar.gz
busybox-w32-7426920461738367205e3d08649c827c747bd93d.tar.bz2
busybox-w32-7426920461738367205e3d08649c827c747bd93d.zip
fix bug 1087. Fix by Leonid (lly.dev AT gmail.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
-rw-r--r--shell/ash_test/ash-misc/nulltick1.right3
-rwxr-xr-xshell/ash_test/ash-misc/nulltick1.tests3
3 files changed, 8 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 798d15a4c..7f14bedb5 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4539,7 +4539,7 @@ forkchild(struct job *jp, union node *n, int mode)
4539 if (mode == FORK_NOJOB /* is it `xxx` ? */ 4539 if (mode == FORK_NOJOB /* is it `xxx` ? */
4540 && n && n->type == NCMD /* is it single cmd? */ 4540 && n && n->type == NCMD /* is it single cmd? */
4541 /* && n->ncmd.args->type == NARG - always true? */ 4541 /* && n->ncmd.args->type == NARG - always true? */
4542 && strcmp(n->ncmd.args->narg.text, "trap") == 0 4542 && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "trap") == 0
4543 && n->ncmd.args->narg.next == NULL /* "trap" with no arguments */ 4543 && n->ncmd.args->narg.next == NULL /* "trap" with no arguments */
4544 /* && n->ncmd.args->narg.backquote == NULL - do we need to check this? */ 4544 /* && n->ncmd.args->narg.backquote == NULL - do we need to check this? */
4545 ) { 4545 ) {
@@ -4627,7 +4627,7 @@ forkchild(struct job *jp, union node *n, int mode)
4627 } 4627 }
4628#if JOBS 4628#if JOBS
4629 if (n && n->type == NCMD 4629 if (n && n->type == NCMD
4630 && strcmp(n->ncmd.args->narg.text, "jobs") == 0 4630 && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "jobs") == 0
4631 ) { 4631 ) {
4632 TRACE(("Job hack\n")); 4632 TRACE(("Job hack\n"));
4633 /* "jobs": we do not want to clear job list for it, 4633 /* "jobs": we do not want to clear job list for it,
diff --git a/shell/ash_test/ash-misc/nulltick1.right b/shell/ash_test/ash-misc/nulltick1.right
new file mode 100644
index 000000000..f90b8209e
--- /dev/null
+++ b/shell/ash_test/ash-misc/nulltick1.right
@@ -0,0 +1,3 @@
1Test 1
2Test 2
3Done
diff --git a/shell/ash_test/ash-misc/nulltick1.tests b/shell/ash_test/ash-misc/nulltick1.tests
new file mode 100755
index 000000000..f81923de3
--- /dev/null
+++ b/shell/ash_test/ash-misc/nulltick1.tests
@@ -0,0 +1,3 @@
1echo Test ` ` 1
2echo Test `</dev/null` 2
3echo Done