* linux-nat.c (linux_nat_wait_1): Bail out, if TARGET_WNOHANG and
[deliverable/binutils-gdb.git] / gdb / linux-nat.c
index f4f843bf0ef13cf7e56803cae080bcc363588145..bde73117de8af311d5e2a074803ab5e7d59e6a4e 100644 (file)
@@ -3255,6 +3255,17 @@ retry:
              sigsuspend (&suspend_mask);
            }
        }
+      else if (target_options & TARGET_WNOHANG)
+       {
+         /* No interesting event for PID yet.  */
+         ourstatus->kind = TARGET_WAITKIND_IGNORE;
+
+         if (debug_linux_nat_async)
+           fprintf_unfiltered (gdb_stdlog, "LLW: exit (ignore)\n");
+
+         restore_child_signals_mask (&prev_mask);
+         return minus_one_ptid;
+       }
 
       /* We shouldn't end up here unless we want to try again.  */
       gdb_assert (lp == NULL);
This page took 0.023181 seconds and 4 git commands to generate.