Bug 118838 - cannot send signals to threads waiting on (p)select
Summary: cannot send signals to threads waiting on (p)select
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc   
(Show other bugs)
Version: 1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-03-21 12:11 UTC by Edward Pilipczuk
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-25 20:38:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

Description Edward Pilipczuk 2004-03-21 12:11:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)

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)
- blocks the SIGCONT signal by calling the  pthread_sigmask function
- listens on pselect on the set of IO channels
  enabling catching the SIGCONT signal
- 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:

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 09:54:57 UTC
Please write a short testcase which reproduces your problem.

Comment 2 Edward Pilipczuk 2004-03-25 20:36:45 UTC
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 20:38:00 UTC
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.