On 2012年02月07日 15:33, Wanlong Gao wrote:
> On 02/06/2012 05:52 PM, Kang Kai wrote:
>
>> Child process sends the last signal before parent process enter the
>> final sleep sometimes, so sleep in parent will not be interrupted then
>> the case fails.
>> Sleep 1 second before send the last signal in child to make sure parent
>> enter the final sleep.
>
> So many sleep() makes me confused.
> Anyway, your patch makes sense. so,
>
> Reviewed-by: Wanlong Gao<[email protected]>
Hi Cyril,

Could you give some comments about this patch?
Thanks.

Regards,
Kai
>> Signed-off-by: Kang Kai<[email protected]>
>> ---
>>   .../conformance/interfaces/mq_timedsend/5-1.c      |    5 ++++-
>>   1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git 
>> a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c 
>> b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
>> index 96daf72..77fe2e0 100644
>> --- 
>> a/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
>> +++ 
>> b/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
>> @@ -82,6 +82,9 @@ int main()
>>              sleep(1);  // give parent time to set up handler
>>              for (i=0; i<MAXMSG+1; i++) {
>>                      mq_timedsend(gqueue, msgptr, strlen(msgptr), 1,&ts);
>> +                    /* make sure parent enter the final sleep */
>> +                    if (i == MAXMSG)
>> +                            sleep(1);
>>                      /* send signal to parent each time message is sent */
>>                      kill(getppid(), SIGABRT);
>>              }
>> @@ -138,4 +141,4 @@ int main()
>>      }
>>
>>      return PTS_UNRESOLVED;
>> -}
>> \ No newline at end of file
>> +}
>


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to