public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bharath Ramesh <bramesh@vt.edu>
To: linux-kernel@vger.kernel.org
Subject: Possible bug: ASYNC IO with RT Signals in threaded application doesnt work
Date: Wed, 23 Mar 2005 23:35:59 -0500	[thread overview]
Message-ID: <20050324043559.GA12615@vt.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

I have a multithread application which uses ASYNC IO but is RT signal
driven. I have a worker thread which handles all connection and accepts
all data that are received. I use SIGRTMIN as the signal to be delivered
whenever my socket is ready with data. All my threads block SIGRTMIN
including the main thread. In the worker thread I have something like
this

while (1) {
  sigwaitinfo ();
  ...
  ...
  ...
}

I am never able dequeue SIGRTMIN from the pending signal queue from the
worker thread. If I do the above in the main thread then I am able
dequeue SIGRTMIN from the pending signal queue.

Is this a bug in the kernel or is it a feature. I am also attaching a
patch along with this email which solves the ASYNC IO problem with RT
signals.

Thanks,

Bharath

---
Bharath Ramesh       <bramesh@vt.edu>       http://csgrad.cs.vt.edu/~bramesh


[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 457 bytes --]

--- linux-2.6.10/fs/fcntl.c.orig	2004-12-24 16:35:01.000000000 -0500
+++ linux-2.6.10/fs/fcntl.c	2005-03-22 14:30:14.298415152 -0500
@@ -469,7 +469,7 @@ static void send_sigio_to_task(struct ta
 			else
 				si.si_band = band_table[reason - POLL_IN];
 			si.si_fd    = fd;
-			if (!send_sig_info(fown->signum, &si, p))
+			if (!send_group_sig_info(fown->signum, &si, p))
 				break;
 		/* fall-through: fall back on the old plain SIGIO signal */
 		case 0:

                 reply	other threads:[~2005-03-24  4:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050324043559.GA12615@vt.edu \
    --to=bramesh@vt.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox