Bug 8908 - Problem with wait
Summary: Problem with wait
Status: CLOSED DUPLICATE of bug 4627
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-01-26 21:09 UTC by tonyd
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-01-27 08:03:52 UTC

Attachments (Terms of Use)
sigaction test case (1.26 KB, text/plain)
2000-01-27 19:25 UTC, tonyd
no flags Details

Description tonyd 2000-01-26 21:09:57 UTC
This is is in relation to BUG# 4627
The wait call doesn't wake up when a signal is received.

We tried to use sigaction but the same thing happens.
here is the code we use to test this.

#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/errno.h>

void static fsigint(s)
int s;

   printf("signal %d received\n", s);


int main(argc, argv)
int argc;
char *argv[];
   int pid;
   int status;

   printf("Current process id is %d\n", getpid());

   pid = fork();   if (pid == 0) {

      printf("Forked process id is %d\n", getpid());

   signal(SIGINT, fsigint);

      errno = 0;
      status = 0;

      printf("ready and waiting...\n");
      pid = wait(&status);

      printf("after wait pid = %d errno = %d\n", pid, errno);


Comment 1 Cristian Gafton 2000-01-27 08:03:59 UTC
The test case will not work. Try to use sigaction (or forward the test case you
used with sigaction)

signal() is unreliable. See bug #4627 for more details.

*** This bug has been marked as a duplicate of 4627 ***

Comment 2 tonyd 2000-01-27 19:25:59 UTC
Created attachment 80 [details]
sigaction test case

Comment 3 Cristian Gafton 2000-01-27 19:38:59 UTC
the sigaction example pretty much works for me - what exactly are you after?

Note You need to log in before you can comment on or make changes to this bug.