Posix timer sends synchronous signals?

I want to handle a timer event in a thread instead of a signal handler by using sigwait. However, the thread waiting on the signal (SIGRTMIN) doesn't recieve the timer signal set by timer_settime and the program aborts with SIGRTMIN. If I modify the program to not set the timer and I send SIGRTMIN asyncronously using kill at the command line, then the thread receives it. This leads me to conclude that timer_settime() generates syncronous signals, as syncronous sigs which are not caught by a sig handler abort the program. But this cannot be correct behavior; it defeats the purpose of having sigwait() available. (It also contradicts the suggested usage mentioned in the man page for thr_sigsetmask()). Anyone else have this problem? I'm using Solaris 8/SPARC.
Here is a simple program that is SUPPOSED to print 'got it!!' once per second, based on timer expirations. Due to the strange behavior of timer_settime(), it instead simply aborts with SIGRTMIN.
I compiled it with cc sigtest.c -lrt -lthread. Any advice on how to get this working? Please pardon the indentation. Thanks.
/* sigtest.c */
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <signal.h>
#include <time.h>
pthread_t handler_thrid;
sigset_t blocked_sigs;
timer_t timerid;
struct sigevent sigspec;
struct itimerspec timer_spec;
void handler_thr(void a)
int sig;
sigset_t set;
printf("handle thr created\n");
sigemptyset(&set);
sigaddset(&set, SIGRTMIN);
while (1)
sigwait(&set);
printf("got it!!\n");
int main()
/* block SIGRTMIN */
pthread_sigmask(0, 0, &blocked_sigs);
sigaddset(&blocked_sigs, SIGRTMIN);
pthread_sigmask(SIG_BLOCK, &blocked_sigs, NULL);
/* create timer that sends SIGRTMIN */
sigspec.sigev_notify = SIGEV_SIGNAL;
sigspec.sigev_signo = SIGRTMIN;
timer_create(CLOCK_REALTIME, &sigspec, &timerid);
/* start thread */
pthread_create(&handler_thrid, NULL, handler_thr, NULL);
/* start timer */
timer_spec.it_value.tv_sec = 1;
timer_spec.it_value.tv_nsec = 0;
timer_spec.it_interval.tv_sec = 1;
timer_spec.it_interval.tv_nsec = 0;
timer_settime(timerid, 0, &timer_spec, NULL);
pthread_join(handler_thrid, NULL);

The combination of adding higher_tick=1 to /etc/system + coding timer_create(CLOCK_HIGHRES) in our application appears to
fix the problem. The app,however, can only be run as root now.
Interestingly, non-posix timers work on Solaris 10.
Is there an "upgrading your app from Solaris 8 to 10" web-site out there?

Similar Messages

  • Airport Time Capsule stop send wireless signal, Airport Time Capsule stop send wireless signal

    After instaling several times, alway after a while the wireless router stop sending the signal, or does not start up like in the morning, especially from a windown computer.
    Out house have several computers in Windows and Mac, iphones and ipads and itouch mac book pro,
    How come the router will not start up after a "night of rest"

    Unfortunately, a solid amber is light is not a good sign.
    Try a complete Factory Default Reset on the Time Capsule using the steps below. This procedure will not affect any of the data that you have stored on the internal hard drive.
    Power off the Time Capsule for 15-20 minutes or longer
    Hold in the reset button on the back of the Time Capsule first, and keep holding for an additional 9-10 seconds while you simultaneously plug the power back in to the Time Capsule
    Release the reset button after the 9-10 hold period and allow a full minute for the Time Capsule to restart
    The Time Capsule light should normally stay solid amber for about 30 seconds and then change to a slow, blinking amber light, indicating that the Time Capsule has been reset and it can now be reconfigured.
    If you try the Factory Default Reset a few times and the light stays solid amber, unfortunately the hard drive has failed, or there is an internal power supply issue with the Time Capsule.
    You should take the Time Capsule to an Apple Store.....if you have one in your area.....or contact Apple Support directly to discuss your options. 
    http://www.apple.com/support/contact/
    If the Time Capsule is out of warranty or not covered by AppleCare, Apple will not offer repairs but there are some shops that specialize in this type of repair. See this link for more details:
    Apple Time Capsule Repairers

  • I have a power mac G5, when starting up doesnt  send no signal to the screen at all

    My name is Emilio1991 and I have problems starting it up, I hit the power button and it start great but it have a problem it doesnt send not signal to the screen at all, I thought it was the video card and buyed a new one and it still with thet same problem I try to find solutios and nothing about that can some one help me with that/???

    Couple of more ideas...
    Have you done a PRAM reset, CMD+Option+p+r...
    http://support.apple.com/kb/HT1379
    In fact, do 3 in a row, takes a bit of time.
    Might be time to replace the PRAM Battery, 4 years is close to their lifespan, far less if ever without AC power, & can cause strange startup problems...
    See which one your G5 has...
    http://eshop.macsales.com/item/Newer%20Technology/CR2032/ 
    http://eshop.macsales.com/item/Newer%20Technology/BAA36VPRAM/ 

  • Ios7 clock app I can no longer see the time or cell signal at the top of the screen.

    I just updated to ios7  I have the iphone 5.
    I can no longer see the cell signal or time at the top of the clock app.  I actually have to leave the clock app to see what time it is or try to read the analog clocks in the time zone section.  I have a friend with a 4s, and they can still see the stuff at the top of the screen.  Help?  Is this a bug, or is there a setting I can change?

    This is what it loks like...no time or cell signal at the top

  • Send(synchronous) step in a loop of A BPM

    Hi
    I am using a send(synchronous) step in a BPM ,  i set it at the beginnig  of a loop but it stops .
    When it is out of loop it is working fine. The result of the response is not a value that ends the loop.
    Do you have any idea what is the problem?
    Thanks
    Antonis

    Insert the send step at the required position in the process definition.
    Do not insert the send step in a loop, block, or fork.
    Defining Sync/Async Communication
    http://help.sap.com/saphelp_nw04/helpdata/en/43/65d4dab39b0398e10000000a1553f6/content.htm

  • My Mac Mini was not sending a signal to the monitor. I powered down using the power button and now it will not start. When i power up I get a strange 2 tone sound, like a warning alarm. The fan starts, and the light comes on, but no screen

    My Mac Mini was not sending a signal to the monitor. I powered down using the power button and now it will not start. When i power up I get a strange 2 tone sound, like a warning alarm. The fan starts, and the light comes on, but no screen.
    I have tried with a wired USB keyboard and mouse using a single screen. Powered up with option pressed. No change.
    Reset SMC  no change

    Run the Apple hardware test to see what it tells you. Run the extended test when prompted, which can take awhile.

  • Mac mini, isn't sending the signal to my LG flatron L204WS monitor

    Hi
    Suddenly tonight my mac mini is not sending the signal to my LG flatron TV (it's worked fine for the past year).
    The troubleshooting I have done so far with positive results is:
    1. installed the mac mini on a 32" tv using a DVI to HDMI cable - works fine
    2. installed the mac mini on a 32" tv using the existing VGA-VGA/DVI adapter (same configuration used on LG) - works fine.
    3. use the LG flatron to connect VGA-VGA with my laptop - works fine.
    ??????? any ideas?????
    thanks
    L

    HI
    Thanks for replying, in pure desperation I opened her up and blowed away the dust and tried it with the top off. Hey presto she booted up to the flatron no problems.
    thanks

  • Apple TV is not sending a signal to the tv, how do i fix this?

    There is no signal coming from the Apple TV, according to the two television sets that I have connected it to.  I have tried using different HDMI cords as well.  I have also tried to plug it in to different HDMI ports on the the television sets.  I have also reset the Apple TV box.  Was there a recent update to the software? I have had the Apple TV for three months now and it was working until today, 9/14/13. How can I get the Apple TV to send a signal to the tv?

    Welcome to the Apple Community.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.
    (You may already have a micro USB cable if you have a camera or other digital device)

  • I need information about sending a signal to Flexmotion board

    how can I create a VI which will send a signal (like sine wave)to Flexmotion board

    Could you please be a bit more specific? Do you want to send a sine wave to an analog output of the board? Which board are you using? Do you want a motor move with a sine wave formed velocity profile?
    Regards,
    Jochen Klier
    Application Engineering Group Leader
    NI-Germany

  • How to save an e-mail as an .eml format and customize the name of the file, for example the name of the file would be "date, time, sender, title"?

    It would be fantastic if when saving my e-mails to my computer the file name could be customized to be something different that just the title of the message. As I suggested in the question if it could be set up to be "date, time, sender, title" it would be great, a lot of help when passing an .eml file between co-workers, or simply organizing your e-mails in folders. Is it possible and if yes, how is it done?

    Install [https://addons.mozilla.org/en-us/thunderbird/addon/importexporttools/ ImportExportTools] and adjust the Options (see picture).
    http://chrisramsden.vfast.co.uk/3_How_to_install_Add-ons_in_Thunderbird.html

  • Configuring Fault Message For the Send Synchronous step

    Hi,
    PI receives a file and sends a soap request to Third pary system. If the data sent to third party system is correct, PI receives a empty soap envelopre. If the data is not approriate, PI receives an fault message(Application Error).PI has to trigger an email in either case.
    I have configured a send synchronous step to initiate Request/Response with a validation fault, followed with send step for triggering an email.once the interface is executed, The process is not moving further from Send synchronous step.In short the steps after send synchronous are not being executed.
    Regards,
    Kiran.

    Hi,
           I have created exception branch if PI receives a validation fault. PI will trigger success email, if the PI receives blank response from third system.PI will trigger failure email, if PI receives a fault message.
    Regards,
    Kiran.

  • Send Synchronous message from Oracle to BPM to CRM in RWB

    Hi All,
    I have a scenario like this Oracle Sender (synchronous interface)-> calling ccBPM -> CRM which is a synchronous process.
    Oracle sends an external message to CRM and get the response back. This is achieved using ccBPM due to some internal calls from ccBPM to MDM also sycnhronously.
    So there are three receive determination created
    Oracle to ccBPM
    ccBPM to MDM
    ccBPM to CRM
    Now, the question is I have some message to be send from RWB for testing whether this process works properly or not in staging system. How do I send the message in RWB for this kind of process. This is a syynchronous process
    And sender should be oracle system, receiver shuld be what? ccBPM or CRM from RWB perspective.
    Hope you all got the question.
    Thanks
    Mike

    Hi,
    How do I send the message in RWB for this kind of process. This is a syynchronous process
    And sender should be oracle system, receiver shuld be what? ccBPM or CRM from RWB perspective.
    You need to mentioned Oracle as sender & receiver would be BPM.
    BTW, why do you put a receiver name, you should only supply Sender parameters (Sender Name, Interface & Namespace), Let PI , determine the receiver which is true testing.
    Regards
    Sushil

  • I m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me. thanks ravi

    i m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me.
    thanks
    ravi
    <Email removed by Host>                                                                                                                                                                                                                                       

    sounds more like Bluetooth rather than moue, but w/o knowing w/o posting mac model type/year we... will... not... know... what you have
    All computers are personal computers, a PC though is also "non-Apple" in common usage.
    Mac also is platform and OS.
    Very confused reading what you are trying to tell us.

  • How can I view The date, time, sender and/or receiver of a text message online?

    I would like to view the date and time sender and receiver of my text messages I read it can be done. I can't find where. If somone one could point me out in the right direction I would appreciate it. Thanks

    Log into your account and to the right of the phone photo you will see usage details in blue then on the next screen pick the phone on the account you want to see the details for and under that you can click to see eveyrthing in detail.  Mary

  • How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.

    How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.
    What I'm looking to do is to have self powered in ceiling speakers in every room in my house with out having to run wires to every room to carry the audio signal. I would like to use the airport express to do the job of carting the audio signal.
    Here's my set up now I have an airport extreme and one airport express that I use to carry audio to one room.

    FWIW. I have used up to four AirPort Express Base Stations (AX) for streaming sucessfully in pretty much the way you have described. I didn't have a need to try more so I can't attest that more would or would not work.

Maybe you are looking for

  • Outlook 2010 will not sync at all

    I have a Iphone 3Gs and Ipad 2 both on IOS 5. Using Windows 7 and Outlook 2010. I have stopped using iCLoud and now Outlook will not sync at all. I turned off iCloud on the devices. While working with Steve from Apple customer care we restored the Ip

  • HT1414 itunes doesn't update any of my devices

    I try everything and i can't restore or update my devices ( iPhone 4, iPad 3, iPod 4, iPhone 3GS ), when i try to update/restore send me the message "device not eligible for requested build" i don't have firewalls, i already change the host file, i d

  • Firefox has broken the link that creates menu / task bars

    firefox tells me it has broken the link that creates task / menu bars. I've uninstalled & reinstalled. Everytime I built new task bars through internet, Firefox crashes on me. Help please. == 2 days ago

  • HT1483 When I try to download itunes I get an error message 7.  How do I fix this?

    I need help installing Itunes on my computer.  It use to work but now I get an error 7 message, (Windows 5).  How can I reinstall Itunes..

  • I can't download the latest version of iTunes

    I tried re-installing Itunes from the website, but a message says "Errors occurred during installation before iTunes could be configured." "Your system has not been modified." I don't know what the last sentence mean,but can you help me?