[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200707232211.15543.rjw@sisk.pl>
Date: Mon, 23 Jul 2007 22:11:14 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Manfred Spraul <manfred@...orfullife.com>
Cc: linux-kernel@...r.kernel.org,
"Agarwal, Lomesh" <lomesh.agarwal@...el.com>,
Nigel Cunningham <nigel@...el.suspend2.net>
Subject: Re: which signal is sent to freeze process?
On Monday, 23 July 2007 21:52, Manfred Spraul wrote:
> Rafael wrote:
> > On Monday, 23 July 2007 20:38, Agarwal, Lomesh wrote:
> > > The other problem I am facing that read from socket returns with ENODATA
> > > when resuming. any ideas?
> >
> > It's of similar kind: the system call checks signal_pending(current) and exit
> > with an error if that's true.
> >
> > Well, I'm afraid we can't place try_to_freeze() in every system call that
> > does something like that ...
> >
> I don't understand why the poll() system call returns to user space.
> poll() uses ERESTARTNOHAND, thus it should not return to user space.
> Any ideas why ERESTARTNOHAND doesn't work?
Well, look at the code in fs/select.c:do_poll() . If signal_pending(current)
is true, the main loop breaks and count is returned to do_sys_poll(). If
zero is returned and signal_pending(current) is still true, do_sys_poll()
returns -EINTR.
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists