Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: signal mask bug?
- X-seq: zsh-workers 40624
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: signal mask bug?
- Date: Thu, 23 Feb 2017 13:39:53 -0800
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=brasslantern-com.20150623.gappssmtp.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=HxOQsxfQhtx9VVXDnHC7cwCh4NImcRZyKuo4rQ4sroI=; b=gmUnyhh/PG/8lQPRp/lTE3Gt2MGQzxRmZf58KpzUihgw8Dr4DJGZx5oF+n02iOQomm NyB3e3i5Z+xxbcwNhEOndZiHTvxL+C+xqzFZXBguR8yfW6IPUaf/3NTLIuqI/34FPRFG VM7s7nKcdf9bbg0iVWbkhoVOuNE4WsnT9XHx9hahkLcxF9QnYACGUBaxewsZJKkddo3q r2/wGXKk686F9iGISq1lf2zmCkDZlDAKcyNX5HKEbQi1b+OdXTA77jS2KfCb47itpf8h cFHdXEzI8La2o7zk7NC26flq6gO8di3pQPgpYawjGiCWvLPIRQCOwRWfSg9kzFPK1ych U7+Q==
- In-reply-to: <20170216201807.GA3274@lorien.comfychair.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170215221757.GA24355@lorien.comfychair.org> <CGME20170216041124epcas3p2d347268b66b542ebe695c6a2766eed55@epcas3p2.samsung.com> <170215201044.ZM15764@torch.brasslantern.com> <20170216094836.7db14518@pwslap01u.europe.root.pri> <20170216201807.GA3274@lorien.comfychair.org>
On Feb 16, 12:18pm, Danek Duvall wrote:
}
} So my colleague did some digging and found that the process is marked with
} WCONTFLG, and that once that happens, you have to check WIFCONTINUED()
} before anything else, because WCONTFLG overwrites all the bits.
Thanks. Slight variation on the patch:
diff --git a/Src/signals.c b/Src/signals.c
index a717677..68a7ae3 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -522,6 +522,11 @@ wait_for_processes(void)
#if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE)
struct timezone dummy_tz;
gettimeofday(&pn->endtime, &dummy_tz);
+#ifdef WIFCONTINUED
+ if (WIFCONTINUED(status))
+ pn->status = SP_RUNNING;
+ else
+#endif
pn->status = status;
pn->ti = ru;
#else
There might be an argument for checking whether the status is already
SP_RUNNING but the above should cover the case of a stopped job that
is sent a SIGCONT from "elsewhere" (i.e., not via fg or bg from the
controlling shell).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author