This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
POSIX pause() never returns
- From: Hans Rosenfeld <rosenfeld at grumpf dot hope-2000 dot org>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 13 Jun 2007 00:12:26 +0200
- Subject: [ECOS] POSIX pause() never returns
While running some of the POSIX package testcases I noticed that pause()
never returns. I traced this problem to this patch:
http://sourceware.org/ml/ecos-patches/2006-07/msg00014.html
What happens here is that cyg_deliver_signals() is called through
posix_asr() -> cyg_posix_signal_asr() -> cyg_deliver_signals() while the
thread is waiting in pause(). After this the thread continues in the
while loop, calling cyg_deliver_signals() again. This call will return
false since there are no more signals pending, and the thread waits
again.
I don't understand the purpose of the above patch, but reverting it
makes pause() work as expected for me.
--
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss