This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 118838 - cannot send signals to threads waiting on (p)select
cannot send signals to threads waiting on (p)select
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
1
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-21 07:11 EST by Edward Pilipczuk
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-25 15:38:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
example of source code for bug#118838 illustration (9.91 KB, text/plain)
2004-03-25 15:36 EST, Edward Pilipczuk
no flags Details

  None (edit)
Description Edward Pilipczuk 2004-03-21 07:11:37 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

Description of problem:
My multithread application works in the following scenario.
global setting
- set signal handler for SIGCONT 
  (in fact it restores only signal service)
thread#1 
- blocks the SIGCONT signal by calling the  pthread_sigmask function
- listens on pselect on the set of IO channels
  enabling catching the SIGCONT signal
thread#2
- sends SIGCONT (pthread_kill) to the thread #1 informing 
  that set of IO channels change their status

Result is that process disapear !

Does it mean that signal catching can be done only by sigwait call?

Version-Release number of selected component (if applicable):
glibc 2.3.2 build 101.4

How reproducible:
Always

Steps to Reproduce:
As in description
    

Actual Results:  process diesapear

Expected Results:  Info, how to catch signals in thread waiting on
select (pselect)

Additional info:
Comment 1 Jakub Jelinek 2004-03-22 04:54:57 EST
Please write a short testcase which reproduces your problem.
Comment 2 Edward Pilipczuk 2004-03-25 15:36:45 EST
Created attachment 98857 [details]
example of source code for bug#118838 illustration

compilation by:
$ g++ pkill.cpp -o pkill -lpthread
Comment 3 Edward Pilipczuk 2004-03-25 15:38:00 EST
I have shrink the code of my application to isolate the proble.
Funny! This code works properly - see attachment.

Note You need to log in before you can comment on or make changes to this bug.