sigaction(), alarm() and time_settime() on Symbian
Hi all,
I'm creating an app using Qt that needs to trigger a timeout after an amount of time; the original implementation uses signal and alarm to generate a SIGALRM and it works very well on my n9; the same code doesn't work on Symbian despite it is supported and built very well.
I've also used sigaction and time_create()/time_settime() with the same result!
Somebody knows where the problem is?! maybe some permitions?!
It's a very strainge behavior since I'am using select() with timeout (in other place) and it is always triggered!
Thanks in advance
Giovanni
Re: sigaction(), alarm() and time_settime() on Symbian
The N9 is a Linux-based device, so it has "real" signals.
Symbian is not Linux, so it has some emulation at most.
I found 2 contradicting things:
Library says there is SIGALRM, [url]http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-66C1493D-5B85-558A-9A39-454E6EBA307B.html[/url] (you will probably have to open the link twice in order to get the actual page), however the actual timer examples on [url]http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-66402932-5C44-556B-A7AC-1C2D245C8B05.html[/url] seem to use custom signals. Page [url]http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-301037F1-1983-565A-88F9-633BBF0EBB91.html[/url] however promises an example for SIGALRM too, you may want to check if there is anything special in it.
A porting book says otherwise, [url]http://books.google.no/books?id=Ht1g4TxUUIgC&pg=PA127&lpg=PA127&dq=SIGALRM+symbian&source=bl&ots=-v_ons5Hef&sig=dBtSemS-T1Aw87Ews9YOz8abhXw&hl=en&sa=X&ei=l9IPUZ6HMIWctQaV0YCoAw&ved=0CFwQ6AEwCA#v=onepage&q=SIGALRM%20symbian&f=false[/url]
Anyway, I move your question to the Qt boards, as it is not related to Symbian C++. There you will hopefully get more insightful suggestions.
Re: sigaction(), alarm() and time_settime() on Symbian
[QUOTE=wizard_hu_;910559]The N9 is a Linux-based device, so it has "real" signals.
Symbian is not Linux, so it has some emulation at most.
I found 2 contradicting things:
Library says there is SIGALRM, [url]http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-66C1493D-5B85-558A-9A39-454E6EBA307B.html[/url] (you will probably have to open the link twice in order to get the actual page), however the actual timer examples on [url]http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-66402932-5C44-556B-A7AC-1C2D245C8B05.html[/url] seem to use custom signals. Page [url]http://library.developer.nokia.com/index.jsp?topic=/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-301037F1-1983-565A-88F9-633BBF0EBB91.html[/url] however promises an example for SIGALRM too, you may want to check if there is anything special in it.
A porting book says otherwise, [url]http://books.google.no/books?id=Ht1g4TxUUIgC&pg=PA127&lpg=PA127&dq=SIGALRM+symbian&source=bl&ots=-v_ons5Hef&sig=dBtSemS-T1Aw87Ews9YOz8abhXw&hl=en&sa=X&ei=l9IPUZ6HMIWctQaV0YCoAw&ved=0CFwQ6AEwCA#v=onepage&q=SIGALRM%20symbian&f=false[/url]
Anyway, I move your question to the Qt boards, as it is not related to Symbian C++. There you will hopefully get more insightful suggestions.[/QUOTE]
Anyway, one of them must work...it is always mentioned in official doc!