Linux-Dash Archive mirror
 help / color / mirror / Atom feed
From: Denys Vlasenko <dvlasenk@redhat.com>
To: Herbert Xu <herbert@gondor.apana.org.au>, dash@vger.kernel.org
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Subject: [PATCH] Rename DOWAIT_NORMAL to DOWAIT_NONBLOCK
Date: Wed, 19 Feb 2020 11:30:08 +0100	[thread overview]
Message-ID: <20200219103008.22230-1-dvlasenk@redhat.com> (raw)

To make it clearer what it is doing: nonblocking wait()

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
 src/jobs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/jobs.c b/src/jobs.c
index 26a6248..d0cf708 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -77,7 +77,7 @@
 #define CUR_STOPPED 0
 
 /* mode flags for dowait */
-#define DOWAIT_NORMAL 0
+#define DOWAIT_NONBLOCK 0
 #define DOWAIT_BLOCK 1
 #define DOWAIT_WAITCMD 2
 
@@ -557,7 +557,7 @@ showjobs(struct output *out, int mode)
 	TRACE(("showjobs(%x) called\n", mode));
 
 	/* If not even one one job changed, there is nothing to do */
-	dowait(DOWAIT_NORMAL, NULL);
+	dowait(DOWAIT_NONBLOCK, NULL);
 
 	for (jp = curjob; jp; jp = jp->prev_job) {
 		if (!(mode & SHOW_CHANGED) || jp->changed)
@@ -1013,7 +1013,7 @@ waitforjob(struct job *jp)
 	int st;
 
 	TRACE(("waitforjob(%%%d) called\n", jp ? jobno(jp) : 0));
-	dowait(jp ? DOWAIT_BLOCK : DOWAIT_NORMAL, jp);
+	dowait(jp ? DOWAIT_BLOCK : DOWAIT_NONBLOCK, jp);
 	if (!jp)
 		return exitstatus;
 
@@ -1123,7 +1123,7 @@ out:
 
 static int dowait(int block, struct job *jp)
 {
-	int pid = block == DOWAIT_NORMAL ? gotsigchld : 1;
+	int pid = block == DOWAIT_NONBLOCK ? gotsigchld : 1;
 
 	while (jp ? jp->state == JOBRUNNING : pid > 0) {
 		if (!jp)
-- 
2.25.0

             reply	other threads:[~2020-02-19 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 10:30 Denys Vlasenko [this message]
2020-04-29  6:07 ` [PATCH] Rename DOWAIT_NORMAL to DOWAIT_NONBLOCK 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=20200219103008.22230-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).