public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: [testsuite] Fix gdb-orphanripper.c lockup on F-17 (/dev/pts/* glibc chown).
Date: Sat, 27 Jun 2026 23:55:58 GMT	[thread overview]
Message-ID: <178260455875.1.4395402363482318432.rpms-gdb-ab816baf6006@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : ab816baf600637e56ff4eee28dd85b26b4c4b857
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2013-01-13T08:22:50+01:00
Stats  : +14/-5 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/ab816baf600637e56ff4eee28dd85b26b4c4b857?branch=gdb-17.2-rebase-f44

Log:
[testsuite] Fix gdb-orphanripper.c lockup on F-17 (/dev/pts/* glibc chown).

---
diff --git a/gdb-orphanripper.c b/gdb-orphanripper.c
index b289477..f8e3f49 100644
--- a/gdb-orphanripper.c
+++ b/gdb-orphanripper.c
@@ -48,10 +48,12 @@
 static const char *progname;
 
 static volatile int signal_chld_hit = 0;
+static volatile pid_t child;
 
 static void signal_chld (int signo)
 {
-  signal_chld_hit = 1;
+  if (child && kill (child, 0) != 0)
+    signal_chld_hit = 1;
 }
 
 static volatile int signal_alrm_hit = 0;
@@ -62,7 +64,6 @@ static void signal_alrm (int signo)
 }
 
 static char childptyname[LINE_MAX];
-static pid_t child;
 
 static void print_child_error (const char *reason, char **argv)
 {
@@ -203,8 +204,13 @@ static int spawn (char **argv, int timeout)
       pollfd.fd = amaster;
       pollfd.events = POLLIN;
       i = ppoll (&pollfd, 1, NULL, &set);
-      if (i == -1 && errno == EINTR && signal_chld_hit)
-	break;
+      if (i == -1 && errno == EINTR)
+	{
+	  if (signal_chld_hit)
+	    break;
+	  /* Non-CHILD child may have exited.  */
+	  continue;
+	}
       assert (i == 1);
       /* Data available?  Process it first.  */
       if (pollfd.revents & POLLIN)

diff --git a/gdb.spec b/gdb.spec
index 36258b8..055cd7f 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -34,7 +34,7 @@ Version: 7.5.1
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 34%{?dist}
+Release: 35%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
 Group: Development/Debuggers
@@ -1446,6 +1446,9 @@ fi
 %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
 
 %changelog
+* Sun Jan 13 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.1-35.fc18
+- [testsuite] Fix gdb-orphanripper.c lockup on F-17 (/dev/pts/* glibc chown).
+
 * Tue Jan  8 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.1-34.fc18
 - Update dlopen to support map_failed probe of glibc (Gary Benson, BZ 886516).
 

                 reply	other threads:[~2026-06-27 23:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178260455875.1.4395402363482318432.rpms-gdb-ab816baf6006@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /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