1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
diff -urpN busybox-1.16.0/shell/ash.c busybox-1.16.0-ash/shell/ash.c
--- busybox-1.16.0/shell/ash.c 2010-01-25 01:59:38.000000000 +0100
+++ busybox-1.16.0-ash/shell/ash.c 2010-02-21 01:52:22.000000000 +0100
@@ -4539,7 +4539,7 @@ forkchild(struct job *jp, union node *n,
if (mode == FORK_NOJOB /* is it `xxx` ? */
&& n && n->type == NCMD /* is it single cmd? */
/* && n->ncmd.args->type == NARG - always true? */
- && strcmp(n->ncmd.args->narg.text, "trap") == 0
+ && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "trap") == 0
&& n->ncmd.args->narg.next == NULL /* "trap" with no arguments */
/* && n->ncmd.args->narg.backquote == NULL - do we need to check this? */
) {
@@ -4627,7 +4627,7 @@ forkchild(struct job *jp, union node *n,
}
#if JOBS
if (n && n->type == NCMD
- && strcmp(n->ncmd.args->narg.text, "jobs") == 0
+ && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "jobs") == 0
) {
TRACE(("Job hack\n"));
/* "jobs": we do not want to clear job list for it,
diff -urpN busybox-1.16.0/shell/ash_test/ash-misc/nulltick1.right busybox-1.16.0-ash/shell/ash_test/ash-misc/nulltick1.right
--- busybox-1.16.0/shell/ash_test/ash-misc/nulltick1.right 1970-01-01 01:00:00.000000000 +0100
+++ busybox-1.16.0-ash/shell/ash_test/ash-misc/nulltick1.right 2010-02-21 01:52:22.000000000 +0100
@@ -0,0 +1,3 @@
+Test 1
+Test 2
+Done
diff -urpN busybox-1.16.0/shell/ash_test/ash-misc/nulltick1.tests busybox-1.16.0-ash/shell/ash_test/ash-misc/nulltick1.tests
--- busybox-1.16.0/shell/ash_test/ash-misc/nulltick1.tests 1970-01-01 01:00:00.000000000 +0100
+++ busybox-1.16.0-ash/shell/ash_test/ash-misc/nulltick1.tests 2010-02-21 01:52:22.000000000 +0100
@@ -0,0 +1,3 @@
+echo Test ` ` 1
+echo Test `</dev/null` 2
+echo Done
|