[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Realtime signals in glibc version 2.3.1

From: Stephen Rothwell
Subject: Realtime signals in glibc version 2.3.1
Date: Fri, 25 Oct 2002 15:09:43 +1000


The following program used to print 32 and 63 on ia32 Linux with
glibc version 2.2.5 (unless linked with -lpthread when 35 and 63
were printed).  With version 2.3.1, -1 and -1 are printed.  This
makes it impossible for programs to use the realtime signals on
Linux without linking against the pthread library.  Is this
intentional?  What is the reasoning.

#include <stdio.h>
#include <signal.h>

int main(int argc, char *argv[])
        printf("SIGRTMIN = %d, SIGRTMAX = %d\n", SIGRTMIN, SIGRTMAX);
        return 0;

Also, if <unistd.h> happens to be included, the _POSIX_REALTIME_SIGNALS
is defined, but SIGRTMIN remains -1 (unless linked against -lpthread).

Stephen Rothwell                    address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]