Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Roger Hill-Cottingham <eesrjhc@bath.ac.uk>
Subject: Re: sigsuspend() returns 111 on Alpha (repeatable, w/ source)
Date: 2000/05/15	[thread overview]
Message-ID: <391FFDB0.22A16175@bath.ac.uk> (raw)
In-Reply-To: slrn8hnv8v.hdi.esorton@charis.erics.world

Eric Sorton wrote:
> 
> Hi All,
> 
> My coworkers and I have found a case where sigsuspend() returns 111.  The
> condition is repeatable using the code in this message.  This behavior
> contradicts what is described in the manual page for sigsuspend().  According
> to the manual page sigsuspend() should ALWAYS return -1; only errno should be
> different.
> 
> The following highlights our configuration:
> 
>     o) Alpha ES40, I can provide more details if necessary.
>     o) RedHat Linux 6.2.
>     o) kernel 2.2.14 (RedHat package 2.2.14-6.0smp).
>     o) glibc 2.1.3 (RedHat package 2.1.3-16).
>     o) egcs 1.1.2 (RedHat package 1.1.2-30).
> 
> The program attached establishes a signal handler for SIGUSR2.  It enters a
> while loop and calls sigsuspend().  It displays a message when the signal
> handler is called and displays the return value of sigsuspend().  If you are
> able to get this to repeat, please let me know as I am curious to see if it is
> repeatable on a platform other than the ES40.
> 
> Depending on the location of the localtime(), the return value of sigsuspend()
> will vary.  If localtime() is commented out, sigsuspend() will return 111.  If
> localtime() is before the loop, sigsuspend() will return -1 the first time,
> 111 there after.  If localtime() is in the loop, sigsuspend() will always
> return -1.  We found it odd that calling localtime() affected the return value
> of sigsuspend :-)
> 
> For example:
> 
> viper% cc sigbug.c -o sigbug
> viper% ./sigbug &
> [2] 3691
> viper% kill -USR2 %2
> in sig handler, got sig 31
> sigsuspend return is -1
> viper% kill -USR2 %2
> in sig handler, got sig 31
> sigsuspend return is 111
> viper% kill -USR2 %2
> in sig handler, got sig 31
> sigsuspend return is 111
> 
> Coincidentally, 111 corresponds to the syscall number for sigsuspend.
> 
> include/asm-alpha/unistd.h:#define __NR_sigsuspend              111
> 
> We ran the same source on an Intel/Linux box and the return value of
> sigsuspend was always -1.
> 
> Eric Sorton <eric@cctcorp.com>
> Command and Control Technologies
> 
> -----

<snip code>

I also get exactly this behaviour on an Alpha EB164 (Microway Screamer
500)
RH6.0, manually updated kernel 2.2.11, RH glibc-2.1.1-7, manually
compiled
egcs-1.1.2.

Regards,
Roger.



  reply	other threads:[~2000-05-15  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-12  4:00 sigsuspend() returns 111 on Alpha (repeatable, w/ source) Eric Sorton
2000-05-15  4:00 ` Roger Hill-Cottingham [this message]
2000-05-16  4:00   ` Eric Sorton
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox