diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-27 02:31:55 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-27 02:31:55 +0200 |
commit | 70392331a98d266af539be4b910812fc7b0a72d4 (patch) | |
tree | f974f7c08d06daffc487bde7eb72433547ef2a08 /shell | |
parent | 65a8b859a9a3f2bb4a62c15ca1f4d01288593734 (diff) | |
download | busybox-w32-70392331a98d266af539be4b910812fc7b0a72d4.tar.gz busybox-w32-70392331a98d266af539be4b910812fc7b0a72d4.tar.bz2 busybox-w32-70392331a98d266af539be4b910812fc7b0a72d4.zip |
ash: comment tweaks, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c index 133b2d40e..864b8f0a4 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -2590,7 +2590,7 @@ setpwd(const char *val, int setold) | |||
2590 | static void hashcd(void); | 2590 | static void hashcd(void); |
2591 | 2591 | ||
2592 | /* | 2592 | /* |
2593 | * Actually do the chdir. We also call hashcd to let the routines in exec.c | 2593 | * Actually do the chdir. We also call hashcd to let other routines |
2594 | * know that the current directory has changed. | 2594 | * know that the current directory has changed. |
2595 | */ | 2595 | */ |
2596 | static int | 2596 | static int |
@@ -4679,6 +4679,7 @@ clear_traps(void) | |||
4679 | static void closescript(void); | 4679 | static void closescript(void); |
4680 | 4680 | ||
4681 | /* Called after fork(), in child */ | 4681 | /* Called after fork(), in child */ |
4682 | /* jp and n are NULL when called by openhere() for heredoc support */ | ||
4682 | static NOINLINE void | 4683 | static NOINLINE void |
4683 | forkchild(struct job *jp, union node *n, int mode) | 4684 | forkchild(struct job *jp, union node *n, int mode) |
4684 | { | 4685 | { |
@@ -4810,6 +4811,7 @@ forkparent(struct job *jp, union node *n, int mode, pid_t pid) | |||
4810 | { | 4811 | { |
4811 | TRACE(("In parent shell: child = %d\n", pid)); | 4812 | TRACE(("In parent shell: child = %d\n", pid)); |
4812 | if (!jp) { | 4813 | if (!jp) { |
4814 | /* jp is NULL when called by openhere() for heredoc support */ | ||
4813 | while (jobless && dowait(DOWAIT_NONBLOCK, NULL) > 0) | 4815 | while (jobless && dowait(DOWAIT_NONBLOCK, NULL) > 0) |
4814 | continue; | 4816 | continue; |
4815 | jobless++; | 4817 | jobless++; |
@@ -4843,6 +4845,7 @@ forkparent(struct job *jp, union node *n, int mode, pid_t pid) | |||
4843 | } | 4845 | } |
4844 | } | 4846 | } |
4845 | 4847 | ||
4848 | /* jp and n are NULL when called by openhere() for heredoc support */ | ||
4846 | static int | 4849 | static int |
4847 | forkshell(struct job *jp, union node *n, int mode) | 4850 | forkshell(struct job *jp, union node *n, int mode) |
4848 | { | 4851 | { |
@@ -4972,8 +4975,7 @@ stoppedjobs(void) | |||
4972 | } | 4975 | } |
4973 | 4976 | ||
4974 | 4977 | ||
4975 | /* ============ redir.c | 4978 | /* |
4976 | * | ||
4977 | * Code for dealing with input/output redirection. | 4979 | * Code for dealing with input/output redirection. |
4978 | */ | 4980 | */ |
4979 | 4981 | ||
@@ -5860,6 +5862,7 @@ evalbackcmd(union node *n, struct backcmd *result) | |||
5860 | ash_msg_and_raise_error("pipe call failed"); | 5862 | ash_msg_and_raise_error("pipe call failed"); |
5861 | jp = makejob(/*n,*/ 1); | 5863 | jp = makejob(/*n,*/ 1); |
5862 | if (forkshell(jp, n, FORK_NOJOB) == 0) { | 5864 | if (forkshell(jp, n, FORK_NOJOB) == 0) { |
5865 | /* child */ | ||
5863 | FORCE_INT_ON; | 5866 | FORCE_INT_ON; |
5864 | close(pip[0]); | 5867 | close(pip[0]); |
5865 | if (pip[1] != 1) { | 5868 | if (pip[1] != 1) { |
@@ -5879,6 +5882,7 @@ evalbackcmd(union node *n, struct backcmd *result) | |||
5879 | evaltree(n, EV_EXIT); /* actually evaltreenr... */ | 5882 | evaltree(n, EV_EXIT); /* actually evaltreenr... */ |
5880 | /* NOTREACHED */ | 5883 | /* NOTREACHED */ |
5881 | } | 5884 | } |
5885 | /* parent */ | ||
5882 | close(pip[1]); | 5886 | close(pip[1]); |
5883 | result->fd = pip[0]; | 5887 | result->fd = pip[0]; |
5884 | result->jp = jp; | 5888 | result->jp = jp; |
@@ -8764,6 +8768,7 @@ evalsubshell(union node *n, int flags) | |||
8764 | evaltreenr(n->nredir.n, flags); | 8768 | evaltreenr(n->nredir.n, flags); |
8765 | /* never returns */ | 8769 | /* never returns */ |
8766 | } | 8770 | } |
8771 | /* parent */ | ||
8767 | status = 0; | 8772 | status = 0; |
8768 | if (!backgnd) | 8773 | if (!backgnd) |
8769 | status = waitforjob(jp); | 8774 | status = waitforjob(jp); |
@@ -8869,6 +8874,7 @@ evalpipe(union node *n, int flags) | |||
8869 | } | 8874 | } |
8870 | } | 8875 | } |
8871 | if (forkshell(jp, lp->n, n->npipe.pipe_backgnd) == 0) { | 8876 | if (forkshell(jp, lp->n, n->npipe.pipe_backgnd) == 0) { |
8877 | /* child */ | ||
8872 | INT_ON; | 8878 | INT_ON; |
8873 | if (pip[1] >= 0) { | 8879 | if (pip[1] >= 0) { |
8874 | close(pip[0]); | 8880 | close(pip[0]); |
@@ -8884,6 +8890,7 @@ evalpipe(union node *n, int flags) | |||
8884 | evaltreenr(lp->n, flags); | 8890 | evaltreenr(lp->n, flags); |
8885 | /* never returns */ | 8891 | /* never returns */ |
8886 | } | 8892 | } |
8893 | /* parent */ | ||
8887 | if (prevfd >= 0) | 8894 | if (prevfd >= 0) |
8888 | close(prevfd); | 8895 | close(prevfd); |
8889 | prevfd = pip[0]; | 8896 | prevfd = pip[0]; |
@@ -9702,8 +9709,7 @@ breakcmd(int argc UNUSED_PARAM, char **argv) | |||
9702 | } | 9709 | } |
9703 | 9710 | ||
9704 | 9711 | ||
9705 | /* ============ input.c | 9712 | /* |
9706 | * | ||
9707 | * This implements the input routines used by the parser. | 9713 | * This implements the input routines used by the parser. |
9708 | */ | 9714 | */ |
9709 | 9715 | ||
@@ -10198,8 +10204,7 @@ setinputstring(char *string) | |||
10198 | } | 10204 | } |
10199 | 10205 | ||
10200 | 10206 | ||
10201 | /* ============ mail.c | 10207 | /* |
10202 | * | ||
10203 | * Routines to check for mail. | 10208 | * Routines to check for mail. |
10204 | */ | 10209 | */ |
10205 | 10210 | ||