Fix compilation warnings/errors when MKSH_NOPROSPECTOFWORK is defined
----- jobs.c: In function `j_waitj': jobs.c:1117: warning: unused variable `omask' jobs.c: In function `j_sigchld': jobs.c:1321: error: `sm_sigchld' undeclared (first use in this function) jobs.c:1321: error: (Each undeclared identifier is reported only once jobs.c:1321: error: for each function it appears in.) -----
This commit is contained in:
parent
3af76d7f94
commit
d601372feb
6
jobs.c
6
jobs.c
@ -1113,8 +1113,10 @@ j_waitj(Job *j,
|
|||||||
{
|
{
|
||||||
Proc *p;
|
Proc *p;
|
||||||
int rv;
|
int rv;
|
||||||
|
#ifndef MKSH_NOPROSPECTOFWORK
|
||||||
#ifdef MKSH_NO_SIGSUSPEND
|
#ifdef MKSH_NO_SIGSUSPEND
|
||||||
sigset_t omask;
|
sigset_t omask;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1314,6 +1316,7 @@ j_sigchld(int sig MKSH_A_UNUSED)
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
int status;
|
int status;
|
||||||
struct rusage ru0, ru1;
|
struct rusage ru0, ru1;
|
||||||
|
#ifndef MKSH_NOPROSPECTOFWORK
|
||||||
#ifdef MKSH_NO_SIGSUSPEND
|
#ifdef MKSH_NO_SIGSUSPEND
|
||||||
sigset_t omask;
|
sigset_t omask;
|
||||||
|
|
||||||
@ -1321,7 +1324,6 @@ j_sigchld(int sig MKSH_A_UNUSED)
|
|||||||
sigprocmask(SIG_BLOCK, &sm_sigchld, &omask);
|
sigprocmask(SIG_BLOCK, &sm_sigchld, &omask);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MKSH_NOPROSPECTOFWORK
|
|
||||||
/*
|
/*
|
||||||
* Don't wait for any processes if a job is partially started.
|
* Don't wait for any processes if a job is partially started.
|
||||||
* This is so we don't do away with the process group leader
|
* This is so we don't do away with the process group leader
|
||||||
@ -1404,8 +1406,10 @@ j_sigchld(int sig MKSH_A_UNUSED)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
j_sigchld_out:
|
j_sigchld_out:
|
||||||
|
#ifndef MKSH_NOPROSPECTOFWORK
|
||||||
#ifdef MKSH_NO_SIGSUSPEND
|
#ifdef MKSH_NO_SIGSUSPEND
|
||||||
sigprocmask(SIG_SETMASK, &omask, NULL);
|
sigprocmask(SIG_SETMASK, &omask, NULL);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
errno = saved_errno;
|
errno = saved_errno;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user