Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362542

Summary: Fix one signal handling issue & initialize the notification array when doing the allocation
Product: [Tools] PTP Reporter: rong li <ronglli>
Component: SCIAssignee: rong li <ronglli>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
A patch to fix one signal handling issue & initialize the notification array when doing the allocation none

Description rong li CLA 2011-11-01 03:23:57 EDT
Build Identifier: 

In this patch, it mainly fixed 3 kind of issues:

1. Fixed one signal handling issues: The old sigmask needs to be restored if the pthread_create failed.

2. The notification array "serialTest[serialNum]" needs to be set to the initial data when doing the allocate. Otherwise, when the data would be incorrect when the array is reused after multiple times.

3. Add codes to catch certain memory allocation exceptions

4. Add correct error check, and return the errcode back when the "feAgent->syncWait()" got an error or the connection handler failed.

Reproducible: Always
Comment 1 rong li CLA 2011-11-01 03:29:56 EDT
Created attachment 206249 [details]
A patch to fix one signal handling issue & initialize the notification array when doing the allocation
Comment 2 rong li CLA 2012-11-06 04:46:47 EST
Have applied the patch into master branch.