From 8e0b23e24556fb6c6b9943bf3747e70b245fc7aa Mon Sep 17 00:00:00 2001 From: Chip Coldwell Date: Thu, 24 Jun 2004 09:56:19 -0700 Subject: X.Org Bug 10632 / Debian Bug 256299: race condition in policy.c:Willing() X.Org Bugzilla #10632 Reported upstream from Debian Bug #256299 --- policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'policy.c') diff --git a/policy.c b/policy.c index c18103d..a9d4bcf 100644 --- a/policy.c +++ b/policy.c @@ -140,8 +140,9 @@ Willing ( if ((fd = popen(willing, "r"))) { char *s = NULL; + errno = 0; while(!(s = fgets(statusBuf, 256, fd)) && errno == EINTR) - ; + errno = 0; if (s && strlen(statusBuf) > 0) statusBuf[strlen(statusBuf)-1] = 0; /* chop newline */ else -- cgit v1.2.3