From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,b1bc03ff4d59dbec X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,9b9028a87ac180c4,start X-Google-Attributes: gidfee84,public From: Rob Kirkbride Subject: Re: Signals and shells question? Date: 1997/09/07 Message-ID: #1/1 X-Deja-AN: 270434436 References: Reply-To: Rob Kirkbride Distribution: world X-NNTP-Posting-Host: rk-comp.demon.co.uk [194.222.52.8] Organization: Bedrock Corp. Newsgroups: comp.unix.programmer,comp.unix.osf.osf1 >> I am using timer_create to generate a SIGUSR2 every 50ms which seems to >> work fine most of the time. (DEC Alpha/3.2g) >> However, if this system becomes busy there seems to be times >> when the shell kills the process and prints "User Defined Signal 2". >> I know its the shell because I grepped and found that string in the >> shell executable (csh). >> I suspect there is a limit of how many signals that can be sent >> before it decides the process is not taking them and kills it. >> Is this limit user or kernel configurable and I am unsure as to >> why it is located in the shell? >> If anyone could shed any light on this it would be most helpful. > > I am using DEC Ada which allows you to tie a entry point (in a task) to > a signal so I have no control over that. > >That could be a problem :-) > >Your description of the problem indicates that, under high load >conditions, the requested SIGUSR2 is being delivered to the process at >a point where the process' signal action for SIGUSR2 is set to SIG_DFL >(which causes the process to terminate, and the shell then reports the >reason for termination). > >Historically, this was almost invariably caused by the old behaviour >of signal() (which still applies to some systems), whereby the action >was reset to SIG_DFL prior to entry into the handling function. The >ANSI C and POSIX standards still permit this behaviour, despite the >fact that it introduces an unavoidable time window during which a >second signal delivery will terminate the process. POSIX solved the >problem by introducing sigaction() as a replacement for signal(). > >If the DEC Ada runtime is using old-style signal handling to implement >the facility to tie tasks to signals, then it is hopelessly broken. >You would need to pursue this with whatever support you may have from >DEC. > Thanks for all the help. It sounds like the DEC implementation is lacking, I will cross post to comp.unix.osf.osf1 and see if DEC have anything to add! Rob -- Rob Kirkbride