This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1002144] New: pthread created from eCos thread have all signals disabled
- From: bugzilla-daemon at ecoscentric dot com
- To: unassigned at bugs dot ecos dot sourceware dot org
- Date: Wed, 20 Apr 2016 12:35:48 +0000
- Subject: [Bug 1002144] New: pthread created from eCos thread have all signals disabled
- Authentication-results: sourceware.org; auth=none
- Authentication-results: mail.ecoscentric.com; dkim=permerror (bad message/signature format)
- Auto-submitted: auto-generated
- Dkim-filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com BFE67A8A6F4
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1002144
Bug ID: 1002144
Summary: pthread created from eCos thread have all signals
disabled
Product: eCos
Version: 3.0
Target: All
Architecture/Host_ Other
OS:
Status: UNCONFIRMED
Severity: enhancement
Priority: low
Component: POSIX
Assignee: unassigned@bugs.ecos.sourceware.org
Reporter: ehoffman@positronaccess.com
QA Contact: ecos-bugs@ecos.sourceware.org
CC: ecos-bugs@ecos.sourceware.org
When creating a POSIX thread from an eCos thread (by specifying
PTHREAD_EXPLICIT_SCHED attribute and filling the appropriate attribute fields),
the pthread is created with all signals blocked.
externC void cyg_posix_thread_siginit( pthread_info *thread,
pthread_info *parentthread )
{
// Clear out signal masks
sigemptyset( &thread->sigpending );
// but threads inherit signal masks
if ( NULL == parentthread ) {
//sigemptyset( &thread->sigmask );
// Block all the signals if thread don't use signal
sigfillset( &thread->sigmask );
}
else
thread->sigmask = parentthread->sigmask;
cyg_pthread_exception_init( thread );
}
when parent thread is NULL (which is the case when parent is eCos thread),
sigmask is filled to "all blocked".
This probably is not in line with what a user would expect, and make porting
existing code error-prone. User (programmer) could have some hard figuring why
the thread is not responding to signals unless explicitly unmasking them..
I would suggest using sigemptyset instead of sigfillset.
Regards,
Eric Hoffman
--
You are receiving this mail because:
You are the assignee for the bug.