Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Tenor sleep forever?

Posted on 2003-03-24
8
Medium Priority
?
219 Views
Last Modified: 2010-04-15
I developed a program on solaris 8 that use usleep function.
I launch five tenors with the program.There is another tenor that send many messages to five tenors.First, five tenors run correctly.After a little,the one sleep forever.When I send any signal to the sleeping tenor,the tenor will run continue.

Thanks.
   Any help will be welcome.
                  Konrad.
0
Comment
Question by:konrad_ying
8 Comments
 
LVL 2

Expert Comment

by:honey_hamster
ID: 8196743
Pavorotti, Carreras, Domingo, ... who are the other 2 tenors?
0
 
LVL 1

Expert Comment

by:oferh
ID: 8197234
I belive that tenor is thread but we need to see
some source if you want help with this problem.
0
 

Author Comment

by:konrad_ying
ID: 8200433
a section of the program source:
----------------------------------------------
nExecuteDone = 0;
while(((time(0) - nStartDoTime) <= nReplyTimeouts) && nExecuteDone == 0)
{
    if(CheckHLRQueueStatus(nHLRCmdQueueID, ST_HLRQUEUE_HOK) < 0)
   {
     usleep(100);
     continue;
     }
         
*nResultMedia = GetHLRQueueExecuteResultMedia(nHLRCmdQueueID);
GetHLRResultVal(nHLRCmdQueueID, *nResultMedia, szResultVal);
     nExecuteDone = 1;
}
-----------------------------------------------
I find when the tenor execute "usleep(100);",the tenor sleep forever.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:oferh
ID: 8202848
does it sleep forever or that it is
doing the CheckHLRQueueStatus function and then sleeps again ?
0
 
LVL 10

Expert Comment

by:substand
ID: 8217113
what if you have the tenor execute "usleep(88);" ... does he still sleep forever?

0
 

Author Comment

by:konrad_ying
ID: 8233304
to oferh:
Yes.
to substand:
I no try to execute "usleep(88)" ,but the tenor is ok when i replace  "usleep(100)" with "sleep(1)" .
0
 
LVL 20

Expert Comment

by:jmcg
ID: 10187145
Nothing has happened on this question in more than 9 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
PAQ, refund points (abandoned by experts, oferh may have been on right track).

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0
 

Accepted Solution

by:
SpazMODic earned 0 total points
ID: 10238752
PAQed, with points refunded (100)

SpazMODic
EE Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question