From: Denys Vlasenko <dvlasenk@redhat.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Denys Vlasenko <dvlasenk@redhat.com>, dash@vger.kernel.org
Subject: [PATCH] jobs: drop unused node parameter in makejob()
Date: Fri, 31 Mar 2023 14:51:57 +0200 [thread overview]
Message-ID: <20230331125158.26821-1-dvlasenk@redhat.com> (raw)
CC: dash@vger.kernel.org
CC: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
src/eval.c | 6 +++---
src/jobs.c | 6 +++---
src/jobs.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/eval.c b/src/eval.c
index fa43b68..978a174 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -494,7 +494,7 @@ evalsubshell(union node *n, int flags)
forkreset();
goto nofork;
}
- jp = makejob(n, 1);
+ jp = makejob(1);
if (forkshell(jp, n, backgnd) == 0) {
flags |= EV_EXIT;
if (backgnd)
@@ -571,7 +571,7 @@ evalpipe(union node *n, int flags)
pipelen++;
flags |= EV_EXIT;
INTOFF;
- jp = makejob(n, pipelen);
+ jp = makejob(pipelen);
prevfd = -1;
for (lp = n->npipe.cmdlist ; lp ; lp = lp->next) {
prehash(lp->n);
@@ -637,7 +637,7 @@ evalbackcmd(union node *n, struct backcmd *result)
if (pipe(pip) < 0)
sh_error("Pipe call failed");
- jp = makejob(n, 1);
+ jp = makejob(1);
if (forkshell(jp, n, FORK_NOJOB) == 0) {
FORCEINTON;
close(pip[0]);
diff --git a/src/jobs.c b/src/jobs.c
index f3b9ffc..5a0886e 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -749,7 +749,7 @@ err:
*/
struct job *
-makejob(union node *node, int nprocs)
+makejob(int nprocs)
{
int i;
struct job *jp;
@@ -780,7 +780,7 @@ makejob(union node *node, int nprocs)
if (nprocs > 1) {
jp->ps = ckmalloc(nprocs * sizeof (struct procstat));
}
- TRACE(("makejob(0x%lx, %d) returns %%%d\n", (long)node, nprocs,
+ TRACE(("makejob(%d) returns %%%d\n", nprocs,
jobno(jp)));
return jp;
}
@@ -963,7 +963,7 @@ struct job *vforkexec(union node *n, char **argv, const char *path, int idx)
struct job *jp;
int pid;
- jp = makejob(n, 1);
+ jp = makejob(1);
sigblockall(NULL);
vforked++;
diff --git a/src/jobs.h b/src/jobs.h
index 6ac6c56..2832d64 100644
--- a/src/jobs.h
+++ b/src/jobs.h
@@ -102,7 +102,7 @@ int jobscmd(int, char **);
struct output;
void showjobs(struct output *, int);
int waitcmd(int, char **);
-struct job *makejob(union node *, int);
+struct job *makejob(int);
int forkshell(struct job *, union node *, int);
struct job *vforkexec(union node *n, char **argv, const char *path, int idx);
int waitforjob(struct job *);
--
2.37.2
next reply other threads:[~2023-03-31 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 12:51 Denys Vlasenko [this message]
2024-04-06 9:27 ` [PATCH] jobs: drop unused node parameter in makejob() Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230331125158.26821-1-dvlasenk@redhat.com \
--to=dvlasenk@redhat.com \
--cc=dash@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).