gnats-prs
[Top][All Lists]
Advanced

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

gnats/455: Problem with signal() on RH8.0 with libc 2.2.93.


From: nina
Subject: gnats/455: Problem with signal() on RH8.0 with libc 2.2.93.
Date: Wed, 12 Feb 2003 03:04:41 -0500

>Number:         455
>Notify-List:    
>Category:       gnats
>Synopsis:       Problem with signal() on RH8.0 with libc 2.2.93.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 12 03:04:40 -0500 2003
>Originator:     Nina
>Release:        gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
>Organization:

>Environment:
P4, RH8.0, libc 2.2.93.
>Description:
The signal() function returns different values on different platforms (RH7.1 
and RH8.0).
The test ts.c (attached) contains call of function signal().
 If we run the execute-file with help of perl script tt.pl (see How-To-Repeat), 
the function signal() returns SIG_IGN (1) on RH8.0 and SIG_DFL (0) on RH7.1. 
 
 If we run the execute-file with help of "./a.out", the function signal() 
returns SIG_DFL (0) on RH7.1 and on RH8.0.
>How-To-Repeat:
tt.pl:
my $out;
open(CMD,"a.out |");
while ( <CMD> ) { $out .= $_; }
print "$out\n";

The file ts.c is attached.
Command lines and output with gcc version 3.2 20020903 (Red Hat Linux 8.0 
3.2-7):
$gcc ts.c; perl tt.pl
a.out: ts.c:12: int main(): Assertion `signal(8, &field_fpe) == 
((__sighandler_t) 0)' failed.


Command line and output with gcc version 2.96 20000731 (Red Hat Linux 7.1 
2.96-98):
$ gcc ts.c; perl tt.pl
$
>Fix:
Unknown
>Unformatted:
 ----gnatsweb-attachment----
 Content-Type: text/plain; name="ts.c"
 Content-Disposition: inline; filename="ts.c"
 
 /* test signal functions */
 #include <assert.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 static void field_fpe(int sig) {}
 
 int main()
        {
 //     assert(signal(SIGFPE, &field_fpe) == SIG_IGN);
        assert(signal(SIGFPE, &field_fpe) == SIG_DFL);
        return 0;
        }
 




reply via email to

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