ash: comment tweaks, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
65a8b859a9
commit
70392331a9
19
shell/ash.c
19
shell/ash.c
@ -2590,7 +2590,7 @@ setpwd(const char *val, int setold)
|
|||||||
static void hashcd(void);
|
static void hashcd(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actually do the chdir. We also call hashcd to let the routines in exec.c
|
* Actually do the chdir. We also call hashcd to let other routines
|
||||||
* know that the current directory has changed.
|
* know that the current directory has changed.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
@ -4679,6 +4679,7 @@ clear_traps(void)
|
|||||||
static void closescript(void);
|
static void closescript(void);
|
||||||
|
|
||||||
/* Called after fork(), in child */
|
/* Called after fork(), in child */
|
||||||
|
/* jp and n are NULL when called by openhere() for heredoc support */
|
||||||
static NOINLINE void
|
static NOINLINE void
|
||||||
forkchild(struct job *jp, union node *n, int mode)
|
forkchild(struct job *jp, union node *n, int mode)
|
||||||
{
|
{
|
||||||
@ -4810,6 +4811,7 @@ forkparent(struct job *jp, union node *n, int mode, pid_t pid)
|
|||||||
{
|
{
|
||||||
TRACE(("In parent shell: child = %d\n", pid));
|
TRACE(("In parent shell: child = %d\n", pid));
|
||||||
if (!jp) {
|
if (!jp) {
|
||||||
|
/* jp is NULL when called by openhere() for heredoc support */
|
||||||
while (jobless && dowait(DOWAIT_NONBLOCK, NULL) > 0)
|
while (jobless && dowait(DOWAIT_NONBLOCK, NULL) > 0)
|
||||||
continue;
|
continue;
|
||||||
jobless++;
|
jobless++;
|
||||||
@ -4843,6 +4845,7 @@ forkparent(struct job *jp, union node *n, int mode, pid_t pid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* jp and n are NULL when called by openhere() for heredoc support */
|
||||||
static int
|
static int
|
||||||
forkshell(struct job *jp, union node *n, int mode)
|
forkshell(struct job *jp, union node *n, int mode)
|
||||||
{
|
{
|
||||||
@ -4972,8 +4975,7 @@ stoppedjobs(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============ redir.c
|
/*
|
||||||
*
|
|
||||||
* Code for dealing with input/output redirection.
|
* Code for dealing with input/output redirection.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -5860,6 +5862,7 @@ evalbackcmd(union node *n, struct backcmd *result)
|
|||||||
ash_msg_and_raise_error("pipe call failed");
|
ash_msg_and_raise_error("pipe call failed");
|
||||||
jp = makejob(/*n,*/ 1);
|
jp = makejob(/*n,*/ 1);
|
||||||
if (forkshell(jp, n, FORK_NOJOB) == 0) {
|
if (forkshell(jp, n, FORK_NOJOB) == 0) {
|
||||||
|
/* child */
|
||||||
FORCE_INT_ON;
|
FORCE_INT_ON;
|
||||||
close(pip[0]);
|
close(pip[0]);
|
||||||
if (pip[1] != 1) {
|
if (pip[1] != 1) {
|
||||||
@ -5879,6 +5882,7 @@ evalbackcmd(union node *n, struct backcmd *result)
|
|||||||
evaltree(n, EV_EXIT); /* actually evaltreenr... */
|
evaltree(n, EV_EXIT); /* actually evaltreenr... */
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
/* parent */
|
||||||
close(pip[1]);
|
close(pip[1]);
|
||||||
result->fd = pip[0];
|
result->fd = pip[0];
|
||||||
result->jp = jp;
|
result->jp = jp;
|
||||||
@ -8764,6 +8768,7 @@ evalsubshell(union node *n, int flags)
|
|||||||
evaltreenr(n->nredir.n, flags);
|
evaltreenr(n->nredir.n, flags);
|
||||||
/* never returns */
|
/* never returns */
|
||||||
}
|
}
|
||||||
|
/* parent */
|
||||||
status = 0;
|
status = 0;
|
||||||
if (!backgnd)
|
if (!backgnd)
|
||||||
status = waitforjob(jp);
|
status = waitforjob(jp);
|
||||||
@ -8869,6 +8874,7 @@ evalpipe(union node *n, int flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (forkshell(jp, lp->n, n->npipe.pipe_backgnd) == 0) {
|
if (forkshell(jp, lp->n, n->npipe.pipe_backgnd) == 0) {
|
||||||
|
/* child */
|
||||||
INT_ON;
|
INT_ON;
|
||||||
if (pip[1] >= 0) {
|
if (pip[1] >= 0) {
|
||||||
close(pip[0]);
|
close(pip[0]);
|
||||||
@ -8884,6 +8890,7 @@ evalpipe(union node *n, int flags)
|
|||||||
evaltreenr(lp->n, flags);
|
evaltreenr(lp->n, flags);
|
||||||
/* never returns */
|
/* never returns */
|
||||||
}
|
}
|
||||||
|
/* parent */
|
||||||
if (prevfd >= 0)
|
if (prevfd >= 0)
|
||||||
close(prevfd);
|
close(prevfd);
|
||||||
prevfd = pip[0];
|
prevfd = pip[0];
|
||||||
@ -9702,8 +9709,7 @@ breakcmd(int argc UNUSED_PARAM, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============ input.c
|
/*
|
||||||
*
|
|
||||||
* This implements the input routines used by the parser.
|
* This implements the input routines used by the parser.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -10198,8 +10204,7 @@ setinputstring(char *string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============ mail.c
|
/*
|
||||||
*
|
|
||||||
* Routines to check for mail.
|
* Routines to check for mail.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user