X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.0 required=5.0 tests=BAYES_50,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Message-ID: <4B1D2338.2050509@cell-active.com> Date: Mon, 07 Dec 2009 16:46:00 +0100 From: Karsten Otto User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: cygwin AT sourceware DOT org Subject: 1.7.0: question about signal delivery to pthreads Content-Type: multipart/mixed; boundary="------------060106050607060003040607" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------060106050607060003040607 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi everybody! I have a question regarding the delivery of signals to pthreads in Cygwin (1.7 beta). As an example, please consider the following situation (see attached file for source code): There are two threads, a main thread and another one created by the main thread. The main registers a SIGALRM signal handler (sigaction), creates the other thread (pthread_create), blocks all signals (pthread_sigmask), then waits for a SIGHUP (sigwait) before joining the other thread (pthread_join). The other thread unblocks all signals (pthread_sigmask), then schedules an alarm (alarm(1)) and goes to sleep (sleep(5)). In this situation, I had expected the other thread to receive the SIGALRM, and to wake up from sleep consequently; at least it did in Linux (2.6.31). However, in Cygwin the signal never arrives, the thread sleeps the full turn. It seems the signal gets delivered to the blocked main thread instead, but attempting to check (sigpending) results in a segmentation fault (SEGV) for some reason. If I explictly remove the SIGALRM from the block mask, the signal handler gets called and sigpending works, but of course this interrupts sigwait (errno=EINTR), hence this is not a viable workaround for me. So, is cygwin behaving correctly here (in a POSIX sense), or is this a bug? Please help me understand. Thank you, Karsten Otto --------------060106050607060003040607 Content-Type: text/plain; name="cygcheck.out" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cygcheck.out" Cygwin Configuration Diagnostics Current System Time: Mon Dec 07 16:04:34 2009 Windows XP Professional Ver 5.1 Build 2600 Service Pack 3 Path: C:\cygwin-1.7\usr\local\bin C:\cygwin-1.7\bin C:\cygwin-1.7\bin C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\WbemC C:\cygwin-1.7\Programme\Java\jdk1.5.0_16\bin C:\Programme\Vim\vim72\ C:\Programme\Java\apache-ant-1.7.1\bin C:\Programme\Java\apache-maven-2.2.1\bin C:\Programme\PostgreSQL\8.3\bin %HOME%\cunit\bin C:\Programme\doxygen\bin C:\Programme\ATI Technologies\ATI.ACE\Core-Static C:\Programme\android-sdk-windows-1.5_r1\tools\ C:\Programme\SlikSvn\bin\ C:\Programme\QuickTime\QTSystem\ Output from C:\cygwin-1.7\bin\id.exe UID: 1003(Karsten) GID: 513(Kein) 0(root) 544(Administratoren) 545(Benutzer) 513(Kein) SysDir: C:\WINDOWS\system32 WinDir: C:\WINDOWS USER = 'Karsten' PWD = '/home/Karsten/work/tmp' CYGWIN = 'tty' HOME = '/home/Karsten' HOMEPATH = '\Dokumente und Einstellungen\Karsten' MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man' APPDATA = 'C:\Dokumente und Einstellungen\Karsten\Anwendungsdaten' HOSTNAME = 'numbersix' TERM = 'cygwin' PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 23 Stepping 10, GenuineIntel' WINDIR = 'C:\WINDOWS' OLDPWD = '/home/Karsten/work' USERDOMAIN = 'NUMBERSIX' OS = 'Windows_NT' ALLUSERSPROFILE = 'C:\Dokumente und Einstellungen\All Users' SVN_EDITOR = 'gvim' TEMP = '/cygdrive/c/DOKUME~1/Karsten/LOKALE~1/Temp' COMMONPROGRAMFILES = 'C:\Programme\Gemeinsame Dateien' QTJAVA = 'C:\Programme\Java\jre6\lib\ext\QTJava.zip' USERNAME = 'Karsten' PROCESSOR_LEVEL = '6' FP_NO_HOST_CHECK = 'NO' SYSTEMDRIVE = 'C:' JAVA_HOME = 'C:\Programme\Java\jdk1.5.0_16' USERPROFILE = 'C:\Dokumente und Einstellungen\Karsten' LANG = 'C' PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' LOGONSERVER = '\\NUMBERSIX' PROCESSOR_ARCHITECTURE = 'x86' !C: = 'C:\cygwin-1.7\bin' SHLVL = '1' PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' HOMEDRIVE = 'C:' PROMPT = '$P$G' COMSPEC = 'C:\WINDOWS\system32\cmd.exe' TMP = '/cygdrive/c/DOKUME~1/Karsten/LOKALE~1/Temp' SYSTEMROOT = 'C:\WINDOWS' PRINTER = 'Brother MFC-8860DN Printer' CVS_RSH = '/bin/ssh' PROCESSOR_REVISION = '170a' MVN_HOME = 'C:\Programme\Java\apache-maven-2.2.1' CLASSPATH = '.;C:\Programme\Java\jdk1.5.0_16\lib\ext\QTJava.zip;C:\Programme\Java\junit4.5\junit-4.5.jar;C:\opt\iText\iText-2.1.6.jar;C:\Programme\Java\jre6\lib\ext\QTJava.zip' INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:' PROGRAMFILES = 'C:\Programme' JAVATOP = 'C:\Programme\Java' NUMBER_OF_PROCESSORS = '2' SESSIONNAME = 'Console' COMPUTERNAME = 'NUMBERSIX' _ = '/usr/bin/cygcheck' HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_CURRENT_USER\Software\Cygwin HKEY_CURRENT_USER\Software\Cygwin\Program Options HKEY_CURRENT_USER\Software\Cygwin\setup HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs\Cygwin (default) = (unsupported type) HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations (default) = '\??\C:\cygwin-1.7' HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Program Options HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup (default) = 'C:\cygwin-1.7' obcaseinsensitive set to 1 Cygwin installations found in the registry: System: Key: d268ca9952412bc8 Path: C:\cygwin-1.7 c: hd NTFS 236266Mb 13% CP CS UN PA FC d: hd NTFS 2047Mb 67% CP CS UN PA FC RECOVERY e: cd N/A N/A C:\cygwin-1.7 / system binary,auto C:\Dokumente und Einstellungen /home system binary C:\cygwin-1.7\bin /usr/bin system binary,auto C:\cygwin-1.7\lib /usr/lib system binary,auto cygdrive prefix /cygdrive user binary,auto Found: C:\cygwin-1.7\bin\awk.exe Found: C:\cygwin-1.7\bin\awk.exe -> C:\cygwin-1.7\bin\gawk.exe Found: C:\cygwin-1.7\bin\bash.exe Found: C:\cygwin-1.7\bin\bash.exe Found: C:\cygwin-1.7\bin\cat.exe Found: C:\cygwin-1.7\bin\cat.exe Found: C:\cygwin-1.7\bin\cp.exe Found: C:\cygwin-1.7\bin\cp.exe Found: C:\cygwin-1.7\bin\cpp.exe Found: C:\cygwin-1.7\bin\cpp.exe -> C:\cygwin-1.7\etc\alternatives\cpp -> C:\cygwin-1.7\bin\cpp-3.exe Not Found: crontab Found: C:\cygwin-1.7\bin\find.exe Found: C:\cygwin-1.7\bin\find.exe Found: C:\WINDOWS\system32\find.exe Warning: C:\cygwin-1.7\bin\find.exe hides C:\WINDOWS\system32\find.exe Found: C:\cygwin-1.7\bin\gcc.exe Found: C:\cygwin-1.7\bin\gcc.exe -> C:\cygwin-1.7\etc\alternatives\gcc -> C:\cygwin-1.7\bin\gcc-3.exe Found: C:\cygwin-1.7\bin\gdb.exe Found: C:\cygwin-1.7\bin\gdb.exe Found: C:\cygwin-1.7\bin\grep.exe Found: C:\cygwin-1.7\bin\grep.exe Found: C:\cygwin-1.7\bin\kill.exe Found: C:\cygwin-1.7\bin\kill.exe Found: C:\cygwin-1.7\bin\ld.exe Found: C:\cygwin-1.7\bin\ld.exe Found: C:\cygwin-1.7\bin\ls.exe Found: C:\cygwin-1.7\bin\ls.exe Found: C:\cygwin-1.7\bin\make.exe Found: C:\cygwin-1.7\bin\make.exe Found: C:\cygwin-1.7\bin\mv.exe Found: C:\cygwin-1.7\bin\mv.exe Not Found: patch Found: C:\cygwin-1.7\bin\perl.exe Found: C:\cygwin-1.7\bin\perl.exe Found: C:\cygwin-1.7\bin\rm.exe Found: C:\cygwin-1.7\bin\rm.exe Found: C:\cygwin-1.7\bin\sed.exe Found: C:\cygwin-1.7\bin\sed.exe Found: C:\cygwin-1.7\bin\ssh.exe Found: C:\cygwin-1.7\bin\ssh.exe Found: C:\cygwin-1.7\bin\sh.exe Found: C:\cygwin-1.7\bin\sh.exe Found: C:\cygwin-1.7\bin\tar.exe Found: C:\cygwin-1.7\bin\tar.exe Found: C:\cygwin-1.7\bin\test.exe Found: C:\cygwin-1.7\bin\test.exe Not Found: vi Found: C:\Programme\Vim\vim72\vim.exe 111k 2009/08/07 C:\cygwin-1.7\bin\cygapr-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygapr-1-0.dll" v0.0 ts=2009/8/7 21:58 87k 2009/08/07 C:\cygwin-1.7\bin\cygaprutil-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygaprutil-1-0.dll" v0.0 ts=2009/8/7 22:46 61k 2009/03/02 C:\cygwin-1.7\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0 "cygbz2-1.dll" v0.0 ts=2009/3/2 4:11 7k 2003/10/19 C:\cygwin-1.7\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0 "cygcrypt-0.dll" v0.0 ts=2003/10/19 9:57 1147k 2009/11/05 C:\cygwin-1.7\bin\cygcrypto-0.9.8.dll - os=4.0 img=1.0 sys=4.0 "cygcrypto-0.9.8.dll" v0.0 ts=2009/11/5 18:36 703k 2007/12/17 C:\cygwin-1.7\bin\cygdb-4.2.dll - os=4.0 img=1.0 sys=4.0 "cygdb-4.2.dll" v0.0 ts=2007/12/17 12:58 943k 2007/12/17 C:\cygwin-1.7\bin\cygdb-4.5.dll - os=4.0 img=1.0 sys=4.0 "cygdb-4.5.dll" v0.0 ts=2007/12/17 14:12 1036k 2007/12/17 C:\cygwin-1.7\bin\cygdb_cxx-4.2.dll - os=4.0 img=1.0 sys=4.0 "cygdb_cxx-4.2.dll" v0.0 ts=2007/12/17 12:58 1296k 2007/12/17 C:\cygwin-1.7\bin\cygdb_cxx-4.5.dll - os=4.0 img=1.0 sys=4.0 "cygdb_cxx-4.5.dll" v0.0 ts=2007/12/17 14:12 118k 2008/05/09 C:\cygwin-1.7\bin\cygexpat-1.dll - os=4.0 img=1.0 sys=4.0 "cygexpat-1.dll" v0.0 ts=2008/5/9 6:03 28k 2009/03/22 C:\cygwin-1.7\bin\cygfam-0.dll - os=4.0 img=1.0 sys=4.0 "cygfam-0.dll" v0.0 ts=2009/3/22 19:56 40k 2009/03/01 C:\cygwin-1.7\bin\cygform-8.dll - os=4.0 img=1.0 sys=4.0 "cygform-8.dll" v0.0 ts=2009/3/1 7:32 43k 2009/11/20 C:\cygwin-1.7\bin\cygform-9.dll - os=4.0 img=1.0 sys=4.0 "cygform-9.dll" v0.0 ts=2009/11/20 20:14 44k 2009/09/29 C:\cygwin-1.7\bin\cyggcc_s-1.dll - os=4.0 img=1.0 sys=4.0 "cyggcc_s-1.dll" v0.0 ts=2009/9/14 17:42 19k 2009/02/26 C:\cygwin-1.7\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm-4.dll" v0.0 ts=2009/2/26 8:58 8k 2009/02/26 C:\cygwin-1.7\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm_compat-4.dll" v0.0 ts=2009/2/26 8:58 516k 2009/10/27 C:\cygwin-1.7\bin\cyggio-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggio-2.0-0.dll" v0.0 ts=2009/10/25 21:39 685k 2009/10/27 C:\cygwin-1.7\bin\cygglib-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cygglib-2.0-0.dll" v0.0 ts=2009/10/25 21:36 13k 2009/10/27 C:\cygwin-1.7\bin\cyggmodule-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggmodule-2.0-0.dll" v0.0 ts=2009/10/25 21:36 315k 2009/06/06 C:\cygwin-1.7\bin\cyggmp-3.dll - os=4.0 img=1.0 sys=4.0 "cyggmp-3.dll" v0.0 ts=2009/6/6 13:23 227k 2009/10/27 C:\cygwin-1.7\bin\cyggobject-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggobject-2.0-0.dll" v0.0 ts=2009/10/25 21:37 15k 2009/10/27 C:\cygwin-1.7\bin\cyggthread-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggthread-2.0-0.dll" v0.0 ts=2009/10/25 21:37 25k 2009/07/06 C:\cygwin-1.7\bin\cyghistory7.dll - os=4.0 img=1.0 sys=4.0 "cyghistory7.dll" v0.0 ts=2009/7/5 16:45 274k 2009/12/03 C:\cygwin-1.7\bin\cygicons-0.dll - os=4.0 img=1.4 sys=4.0 "cygicons-0.dll" v0.0 ts=2009/12/3 9:07 981k 2009/05/30 C:\cygwin-1.7\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0 "cygiconv-2.dll" v0.0 ts=2009/5/30 21:05 37k 2003/08/10 C:\cygwin-1.7\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0 "cygintl-2.dll" v0.0 ts=2003/8/10 23:50 31k 2005/11/20 C:\cygwin-1.7\bin\cygintl-3.dll - os=4.0 img=1.0 sys=4.0 "cygintl-3.dll" v0.0 ts=2005/11/20 3:04 31k 2009/04/03 C:\cygwin-1.7\bin\cygintl-8.dll - os=4.0 img=1.0 sys=4.0 "cygintl-8.dll" v0.0 ts=2009/4/3 3:15 39k 2008/09/07 C:\cygwin-1.7\bin\cyglber-2-3-0.dll - os=4.0 img=1.0 sys=4.0 "cyglber-2-3-0.dll" v0.0 ts=2008/9/7 14:28 189k 2008/09/07 C:\cygwin-1.7\bin\cygldap-2-3-0.dll - os=4.0 img=1.0 sys=4.0 "cygldap-2-3-0.dll" v0.0 ts=2008/9/7 14:29 201k 2008/09/07 C:\cygwin-1.7\bin\cygldap_r-2-3-0.dll - os=4.0 img=1.0 sys=4.0 "cygldap_r-2-3-0.dll" v0.0 ts=2008/9/7 14:31 5k 2009/12/04 C:\cygwin-1.7\bin\cyglsa.dll - os=4.0 img=1.0 sys=4.0 "cyglsa.dll" v0.0 ts=2009/12/4 17:09 9k 2009/12/04 C:\cygwin-1.7\bin\cyglsa64.dll - os=4.0 img=0.0 sys=5.2 123k 2009/08/30 C:\cygwin-1.7\bin\cyglzma-1.dll - os=4.0 img=1.0 sys=4.0 "cyglzma-1.dll" v0.0 ts=2009/8/31 0:35 21k 2009/03/01 C:\cygwin-1.7\bin\cygmenu-8.dll - os=4.0 img=1.0 sys=4.0 "cygmenu-8.dll" v0.0 ts=2009/3/1 7:31 25k 2009/11/20 C:\cygwin-1.7\bin\cygmenu-9.dll - os=4.0 img=1.0 sys=4.0 "cygmenu-9.dll" v0.0 ts=2009/11/20 20:13 24k 2008/10/30 C:\cygwin-1.7\bin\cygminires.dll - os=4.0 img=1.2 sys=4.0 "cygminires.dll" v0.0 ts=2008/10/31 0:53 211k 2009/06/06 C:\cygwin-1.7\bin\cygmp-3.dll - os=4.0 img=1.0 sys=4.0 "cygmp-3.dll" v0.0 ts=2009/6/6 13:23 66k 2009/03/01 C:\cygwin-1.7\bin\cygncurses++-8.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++-8.dll" v0.0 ts=2009/3/1 7:39 63k 2009/11/20 C:\cygwin-1.7\bin\cygncurses++-9.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++-9.dll" v0.0 ts=2009/11/20 20:25 237k 2009/03/01 C:\cygwin-1.7\bin\cygncurses-8.dll - os=4.0 img=1.0 sys=4.0 "cygncurses-8.dll" v0.0 ts=2009/3/1 7:28 198k 2009/11/20 C:\cygwin-1.7\bin\cygncurses-9.dll - os=4.0 img=1.0 sys=4.0 "cygncurses-9.dll" v0.0 ts=2009/11/20 20:10 115k 2009/09/30 C:\cygwin-1.7\bin\cygneon-27.dll - os=4.0 img=1.0 sys=4.0 "cygneon-27.dll" v0.0 ts=2009/9/30 15:33 11k 2009/03/01 C:\cygwin-1.7\bin\cygpanel-8.dll - os=4.0 img=1.0 sys=4.0 "cygpanel-8.dll" v0.0 ts=2009/3/1 7:30 13k 2009/11/20 C:\cygwin-1.7\bin\cygpanel-9.dll - os=4.0 img=1.0 sys=4.0 "cygpanel-9.dll" v0.0 ts=2009/11/20 20:12 217k 2009/11/10 C:\cygwin-1.7\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0 "cygpcre-0.dll" v0.0 ts=2009/10/25 10:42 8k 2009/11/10 C:\cygwin-1.7\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0 "cygpcreposix-0.dll" v0.0 ts=2009/10/25 10:42 1628k 2009/11/25 C:\cygwin-1.7\bin\cygperl5_10.dll - os=4.0 img=1.0 sys=4.0 "cygperl5_10.dll" v0.0 ts=2009/11/25 19:01 22k 2002/06/09 C:\cygwin-1.7\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0 "cygpopt-0.dll" v0.0 ts=2002/6/9 7:45 103k 2009/01/07 C:\cygwin-1.7\bin\cygpq.dll - os=4.0 img=1.0 sys=4.0 "cygpq.dll" v0.0 ts=2009/1/7 17:46 162k 2009/07/06 C:\cygwin-1.7\bin\cygreadline7.dll - os=4.0 img=1.0 sys=4.0 "cygreadline7.dll" v0.0 ts=2009/7/5 16:45 78k 2004/10/13 C:\cygwin-1.7\bin\cygsasl2-2.dll - os=4.0 img=1.0 sys=4.0 "cygsasl2-2.dll" v0.0 ts=2004/10/14 0:50 43k 2009/02/06 C:\cygwin-1.7\bin\cygserf-0-0.dll - os=4.0 img=1.0 sys=4.0 "cygserf-0-0.dll" v0.0 ts=2009/2/6 18:04 7k 2009/07/22 C:\cygwin-1.7\bin\cygsigsegv-0.dll - os=4.0 img=1.0 sys=4.0 "cygsigsegv-0.dll" v0.0 ts=2009/7/22 10:57 355k 2008/09/09 C:\cygwin-1.7\bin\cygsqlite3-0.dll - os=4.0 img=1.0 sys=4.0 "cygsqlite3-0.dll" v0.0 ts=2008/9/9 20:20 252k 2009/11/05 C:\cygwin-1.7\bin\cygssl-0.9.8.dll - os=4.0 img=1.0 sys=4.0 "cygssl-0.9.8.dll" v0.0 ts=2009/11/5 18:36 8k 2009/09/29 C:\cygwin-1.7\bin\cygssp-0.dll - os=4.0 img=1.0 sys=4.0 "cygssp-0.dll" v0.0 ts=2009/9/14 17:49 771k 2009/09/29 C:\cygwin-1.7\bin\cygstdc++-6.dll - os=4.0 img=1.0 sys=4.0 "cygstdc++-6.dll" v0.0 ts=2009/9/14 18:19 234k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_client-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_client-1-0.dll" v0.0 ts=2009/10/23 17:46 36k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_delta-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_delta-1-0.dll" v0.0 ts=2009/10/23 17:43 39k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_diff-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_diff-1-0.dll" v0.0 ts=2009/10/23 17:43 18k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs-1-0.dll" v0.0 ts=2009/10/23 17:44 144k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs_base-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs_base-1-0.dll" v0.0 ts=2009/10/23 17:43 123k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs_fs-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs_fs-1-0.dll" v0.0 ts=2009/10/23 17:43 7k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs_util-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs_util-1-0.dll" v0.0 ts=2009/10/23 17:43 30k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra-1-0.dll" v0.0 ts=2009/10/23 17:46 23k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_local-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_local-1-0.dll" v0.0 ts=2009/10/23 17:44 113k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_neon-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_neon-1-0.dll" v0.0 ts=2009/10/23 17:43 114k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_serf-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_serf-1-0.dll" v0.0 ts=2009/10/23 17:43 70k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_svn-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_svn-1-0.dll" v0.0 ts=2009/10/23 17:43 138k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_repos-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_repos-1-0.dll" v0.0 ts=2009/10/23 17:44 246k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_subr-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_subr-1-0.dll" v0.0 ts=2009/10/23 17:43 240k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_wc-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_wc-1-0.dll" v0.0 ts=2009/10/23 17:43 48k 2009/11/20 C:\cygwin-1.7\bin\cygtic-9.dll - os=4.0 img=1.0 sys=4.0 "cygtic-9.dll" v0.0 ts=2009/11/20 20:10 24k 2009/03/29 C:\cygwin-1.7\bin\cygwrap-0.dll - os=4.0 img=1.0 sys=4.0 "cygwrap-0.dll" v0.0 ts=2009/3/29 8:28 64k 2009/03/02 C:\cygwin-1.7\bin\cygz.dll - os=4.0 img=1.0 sys=4.0 "cygz.dll" v0.0 ts=2009/3/2 2:33 2420k 2009/12/04 C:\cygwin-1.7\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0 "cygwin1.dll" v0.0 ts=2009/12/4 17:08 Cygwin DLL version info: DLL version: 1.7.0 DLL epoch: 19 DLL old termios: 5 DLL malloc env: 28 Cygwin conv: 181 API major: 0 API minor: 218 Shared data: 5 DLL identifier: cygwin1 Mount registry: 3 Cygwin registry name: Cygwin Program options name: Program Options Installations name: Installations Cygdrive default prefix: Build date: Fri Dec 4 17:08:35 CET 2009 Shared id: cygwin1S5 111k 2009/08/07 C:\cygwin-1.7\bin\cygapr-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygapr-1-0.dll" v0.0 ts=2009/8/7 21:58 87k 2009/08/07 C:\cygwin-1.7\bin\cygaprutil-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygaprutil-1-0.dll" v0.0 ts=2009/8/7 22:46 61k 2009/03/02 C:\cygwin-1.7\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0 "cygbz2-1.dll" v0.0 ts=2009/3/2 4:11 7k 2003/10/19 C:\cygwin-1.7\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0 "cygcrypt-0.dll" v0.0 ts=2003/10/19 9:57 1147k 2009/11/05 C:\cygwin-1.7\bin\cygcrypto-0.9.8.dll - os=4.0 img=1.0 sys=4.0 "cygcrypto-0.9.8.dll" v0.0 ts=2009/11/5 18:36 703k 2007/12/17 C:\cygwin-1.7\bin\cygdb-4.2.dll - os=4.0 img=1.0 sys=4.0 "cygdb-4.2.dll" v0.0 ts=2007/12/17 12:58 943k 2007/12/17 C:\cygwin-1.7\bin\cygdb-4.5.dll - os=4.0 img=1.0 sys=4.0 "cygdb-4.5.dll" v0.0 ts=2007/12/17 14:12 1036k 2007/12/17 C:\cygwin-1.7\bin\cygdb_cxx-4.2.dll - os=4.0 img=1.0 sys=4.0 "cygdb_cxx-4.2.dll" v0.0 ts=2007/12/17 12:58 1296k 2007/12/17 C:\cygwin-1.7\bin\cygdb_cxx-4.5.dll - os=4.0 img=1.0 sys=4.0 "cygdb_cxx-4.5.dll" v0.0 ts=2007/12/17 14:12 118k 2008/05/09 C:\cygwin-1.7\bin\cygexpat-1.dll - os=4.0 img=1.0 sys=4.0 "cygexpat-1.dll" v0.0 ts=2008/5/9 6:03 28k 2009/03/22 C:\cygwin-1.7\bin\cygfam-0.dll - os=4.0 img=1.0 sys=4.0 "cygfam-0.dll" v0.0 ts=2009/3/22 19:56 40k 2009/03/01 C:\cygwin-1.7\bin\cygform-8.dll - os=4.0 img=1.0 sys=4.0 "cygform-8.dll" v0.0 ts=2009/3/1 7:32 43k 2009/11/20 C:\cygwin-1.7\bin\cygform-9.dll - os=4.0 img=1.0 sys=4.0 "cygform-9.dll" v0.0 ts=2009/11/20 20:14 44k 2009/09/29 C:\cygwin-1.7\bin\cyggcc_s-1.dll - os=4.0 img=1.0 sys=4.0 "cyggcc_s-1.dll" v0.0 ts=2009/9/14 17:42 19k 2009/02/26 C:\cygwin-1.7\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm-4.dll" v0.0 ts=2009/2/26 8:58 8k 2009/02/26 C:\cygwin-1.7\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm_compat-4.dll" v0.0 ts=2009/2/26 8:58 516k 2009/10/27 C:\cygwin-1.7\bin\cyggio-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggio-2.0-0.dll" v0.0 ts=2009/10/25 21:39 685k 2009/10/27 C:\cygwin-1.7\bin\cygglib-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cygglib-2.0-0.dll" v0.0 ts=2009/10/25 21:36 13k 2009/10/27 C:\cygwin-1.7\bin\cyggmodule-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggmodule-2.0-0.dll" v0.0 ts=2009/10/25 21:36 315k 2009/06/06 C:\cygwin-1.7\bin\cyggmp-3.dll - os=4.0 img=1.0 sys=4.0 "cyggmp-3.dll" v0.0 ts=2009/6/6 13:23 227k 2009/10/27 C:\cygwin-1.7\bin\cyggobject-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggobject-2.0-0.dll" v0.0 ts=2009/10/25 21:37 15k 2009/10/27 C:\cygwin-1.7\bin\cyggthread-2.0-0.dll - os=4.0 img=1.0 sys=4.0 "cyggthread-2.0-0.dll" v0.0 ts=2009/10/25 21:37 25k 2009/07/06 C:\cygwin-1.7\bin\cyghistory7.dll - os=4.0 img=1.0 sys=4.0 "cyghistory7.dll" v0.0 ts=2009/7/5 16:45 274k 2009/12/03 C:\cygwin-1.7\bin\cygicons-0.dll - os=4.0 img=1.4 sys=4.0 "cygicons-0.dll" v0.0 ts=2009/12/3 9:07 981k 2009/05/30 C:\cygwin-1.7\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0 "cygiconv-2.dll" v0.0 ts=2009/5/30 21:05 37k 2003/08/10 C:\cygwin-1.7\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0 "cygintl-2.dll" v0.0 ts=2003/8/10 23:50 31k 2005/11/20 C:\cygwin-1.7\bin\cygintl-3.dll - os=4.0 img=1.0 sys=4.0 "cygintl-3.dll" v0.0 ts=2005/11/20 3:04 31k 2009/04/03 C:\cygwin-1.7\bin\cygintl-8.dll - os=4.0 img=1.0 sys=4.0 "cygintl-8.dll" v0.0 ts=2009/4/3 3:15 39k 2008/09/07 C:\cygwin-1.7\bin\cyglber-2-3-0.dll - os=4.0 img=1.0 sys=4.0 "cyglber-2-3-0.dll" v0.0 ts=2008/9/7 14:28 189k 2008/09/07 C:\cygwin-1.7\bin\cygldap-2-3-0.dll - os=4.0 img=1.0 sys=4.0 "cygldap-2-3-0.dll" v0.0 ts=2008/9/7 14:29 201k 2008/09/07 C:\cygwin-1.7\bin\cygldap_r-2-3-0.dll - os=4.0 img=1.0 sys=4.0 "cygldap_r-2-3-0.dll" v0.0 ts=2008/9/7 14:31 5k 2009/12/04 C:\cygwin-1.7\bin\cyglsa.dll - os=4.0 img=1.0 sys=4.0 "cyglsa.dll" v0.0 ts=2009/12/4 17:09 9k 2009/12/04 C:\cygwin-1.7\bin\cyglsa64.dll - os=4.0 img=0.0 sys=5.2 123k 2009/08/30 C:\cygwin-1.7\bin\cyglzma-1.dll - os=4.0 img=1.0 sys=4.0 "cyglzma-1.dll" v0.0 ts=2009/8/31 0:35 21k 2009/03/01 C:\cygwin-1.7\bin\cygmenu-8.dll - os=4.0 img=1.0 sys=4.0 "cygmenu-8.dll" v0.0 ts=2009/3/1 7:31 25k 2009/11/20 C:\cygwin-1.7\bin\cygmenu-9.dll - os=4.0 img=1.0 sys=4.0 "cygmenu-9.dll" v0.0 ts=2009/11/20 20:13 24k 2008/10/30 C:\cygwin-1.7\bin\cygminires.dll - os=4.0 img=1.2 sys=4.0 "cygminires.dll" v0.0 ts=2008/10/31 0:53 211k 2009/06/06 C:\cygwin-1.7\bin\cygmp-3.dll - os=4.0 img=1.0 sys=4.0 "cygmp-3.dll" v0.0 ts=2009/6/6 13:23 66k 2009/03/01 C:\cygwin-1.7\bin\cygncurses++-8.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++-8.dll" v0.0 ts=2009/3/1 7:39 63k 2009/11/20 C:\cygwin-1.7\bin\cygncurses++-9.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++-9.dll" v0.0 ts=2009/11/20 20:25 237k 2009/03/01 C:\cygwin-1.7\bin\cygncurses-8.dll - os=4.0 img=1.0 sys=4.0 "cygncurses-8.dll" v0.0 ts=2009/3/1 7:28 198k 2009/11/20 C:\cygwin-1.7\bin\cygncurses-9.dll - os=4.0 img=1.0 sys=4.0 "cygncurses-9.dll" v0.0 ts=2009/11/20 20:10 115k 2009/09/30 C:\cygwin-1.7\bin\cygneon-27.dll - os=4.0 img=1.0 sys=4.0 "cygneon-27.dll" v0.0 ts=2009/9/30 15:33 11k 2009/03/01 C:\cygwin-1.7\bin\cygpanel-8.dll - os=4.0 img=1.0 sys=4.0 "cygpanel-8.dll" v0.0 ts=2009/3/1 7:30 13k 2009/11/20 C:\cygwin-1.7\bin\cygpanel-9.dll - os=4.0 img=1.0 sys=4.0 "cygpanel-9.dll" v0.0 ts=2009/11/20 20:12 217k 2009/11/10 C:\cygwin-1.7\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0 "cygpcre-0.dll" v0.0 ts=2009/10/25 10:42 8k 2009/11/10 C:\cygwin-1.7\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0 "cygpcreposix-0.dll" v0.0 ts=2009/10/25 10:42 1628k 2009/11/25 C:\cygwin-1.7\bin\cygperl5_10.dll - os=4.0 img=1.0 sys=4.0 "cygperl5_10.dll" v0.0 ts=2009/11/25 19:01 22k 2002/06/09 C:\cygwin-1.7\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0 "cygpopt-0.dll" v0.0 ts=2002/6/9 7:45 103k 2009/01/07 C:\cygwin-1.7\bin\cygpq.dll - os=4.0 img=1.0 sys=4.0 "cygpq.dll" v0.0 ts=2009/1/7 17:46 162k 2009/07/06 C:\cygwin-1.7\bin\cygreadline7.dll - os=4.0 img=1.0 sys=4.0 "cygreadline7.dll" v0.0 ts=2009/7/5 16:45 78k 2004/10/13 C:\cygwin-1.7\bin\cygsasl2-2.dll - os=4.0 img=1.0 sys=4.0 "cygsasl2-2.dll" v0.0 ts=2004/10/14 0:50 43k 2009/02/06 C:\cygwin-1.7\bin\cygserf-0-0.dll - os=4.0 img=1.0 sys=4.0 "cygserf-0-0.dll" v0.0 ts=2009/2/6 18:04 7k 2009/07/22 C:\cygwin-1.7\bin\cygsigsegv-0.dll - os=4.0 img=1.0 sys=4.0 "cygsigsegv-0.dll" v0.0 ts=2009/7/22 10:57 355k 2008/09/09 C:\cygwin-1.7\bin\cygsqlite3-0.dll - os=4.0 img=1.0 sys=4.0 "cygsqlite3-0.dll" v0.0 ts=2008/9/9 20:20 252k 2009/11/05 C:\cygwin-1.7\bin\cygssl-0.9.8.dll - os=4.0 img=1.0 sys=4.0 "cygssl-0.9.8.dll" v0.0 ts=2009/11/5 18:36 8k 2009/09/29 C:\cygwin-1.7\bin\cygssp-0.dll - os=4.0 img=1.0 sys=4.0 "cygssp-0.dll" v0.0 ts=2009/9/14 17:49 771k 2009/09/29 C:\cygwin-1.7\bin\cygstdc++-6.dll - os=4.0 img=1.0 sys=4.0 "cygstdc++-6.dll" v0.0 ts=2009/9/14 18:19 234k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_client-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_client-1-0.dll" v0.0 ts=2009/10/23 17:46 36k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_delta-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_delta-1-0.dll" v0.0 ts=2009/10/23 17:43 39k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_diff-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_diff-1-0.dll" v0.0 ts=2009/10/23 17:43 18k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs-1-0.dll" v0.0 ts=2009/10/23 17:44 144k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs_base-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs_base-1-0.dll" v0.0 ts=2009/10/23 17:43 123k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs_fs-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs_fs-1-0.dll" v0.0 ts=2009/10/23 17:43 7k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_fs_util-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_fs_util-1-0.dll" v0.0 ts=2009/10/23 17:43 30k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra-1-0.dll" v0.0 ts=2009/10/23 17:46 23k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_local-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_local-1-0.dll" v0.0 ts=2009/10/23 17:44 113k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_neon-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_neon-1-0.dll" v0.0 ts=2009/10/23 17:43 114k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_serf-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_serf-1-0.dll" v0.0 ts=2009/10/23 17:43 70k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_ra_svn-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_ra_svn-1-0.dll" v0.0 ts=2009/10/23 17:43 138k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_repos-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_repos-1-0.dll" v0.0 ts=2009/10/23 17:44 246k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_subr-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_subr-1-0.dll" v0.0 ts=2009/10/23 17:43 240k 2009/10/26 C:\cygwin-1.7\bin\cygsvn_wc-1-0.dll - os=4.0 img=1.0 sys=4.0 "cygsvn_wc-1-0.dll" v0.0 ts=2009/10/23 17:43 48k 2009/11/20 C:\cygwin-1.7\bin\cygtic-9.dll - os=4.0 img=1.0 sys=4.0 "cygtic-9.dll" v0.0 ts=2009/11/20 20:10 24k 2009/03/29 C:\cygwin-1.7\bin\cygwrap-0.dll - os=4.0 img=1.0 sys=4.0 "cygwrap-0.dll" v0.0 ts=2009/3/29 8:28 64k 2009/03/02 C:\cygwin-1.7\bin\cygz.dll - os=4.0 img=1.0 sys=4.0 "cygz.dll" v0.0 ts=2009/3/2 2:33 2420k 2009/12/04 C:\cygwin-1.7\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0 "cygwin1.dll" v0.0 ts=2009/12/4 17:08 Cygwin DLL version info: DLL version: 1.7.0 DLL epoch: 19 DLL old termios: 5 DLL malloc env: 28 Cygwin conv: 181 API major: 0 API minor: 218 Shared data: 5 DLL identifier: cygwin1 Mount registry: 3 Cygwin registry name: Cygwin Program options name: Program Options Installations name: Installations Cygdrive default prefix: Build date: Fri Dec 4 17:08:35 CET 2009 Shared id: cygwin1S5 No Cygwin services found. Cygwin Package Information Last downloaded files to: Last downloaded files from: Package Version _update-info-dir 00834-1 alternatives 1.3.30c-10 autoconf 7-10 autoconf2.1 2.13-10 autoconf2.5 2.64-10 automake 4-10 automake1.10 1.10.2-10 automake1.11 1.11-10 automake1.4 1.4p6-10 automake1.5 1.5-10 automake1.6 1.6.3-11 automake1.7 1.7.9-10 automake1.8 1.8.5-10 automake1.9 1.9.6-10 base-cygwin 2.0-1 base-files 3.9-2 base-passwd 3.1-1 bash 3.2.49-23 binutils 2.19.51-1 bzip2 1.0.5-10 coreutils 7.0-2 crypt 1.1-1 csih 0.9.1-1 ctags 5.7-1 cygrunsrv 1.34-1 cygutils 1.4.1-2 cygwin 1.7.0-68 cygwin-doc 1.5-1 dash 0.5.5.1-2 diffutils 2.8.7-1 editrights 1.01-2 expat 2.0.1-1 findutils 4.5.4-1 gamin 0.1.10-10 gawk 3.1.7-1 gcc-core 3.4.4-999 gcc-g++ 3.4.4-999 gcc-mingw-core 20050522-1 gcc-mingw-g++ 20050522-1 gdb 6.8-2 gettext 0.17-11 grep 2.5.4-2 groff 1.19.2-2 gzip 1.3.12-2 ipc-utils 1.0-1 irssi 0.8.14-1 less 429-1 libapr1 1.3.8-2 libaprutil1 1.3.9-2 libbz2_1 1.0.5-10 libdb4.2 4.2.52.5-2 libdb4.5 4.5.20.2-2 libexpat1 2.0.1-1 libexpat1-devel 2.0.1-1 libfam0 0.1.10-10 libgcc1 4.3.4-1 libgdbm4 1.8.3-20 libglib2.0_0 2.22.2-1 libgmp3 4.3.1-3 libiconv2 1.13-10 libintl2 0.12.1-3 libintl3 0.14.5-1 libintl8 0.17-11 liblzma1 4.999.9beta-10 libncurses-devel 5.7-16 libncurses8 5.5-10 libncurses9 5.7-16 libneon27 0.29.0-1 libopenldap2_3_0 2.3.43-1 libpcre0 8.00-1 libpopt0 1.6.4-4 libpq5 8.2.11-1 libreadline7 6.0.3-2 libsasl2 2.1.19-3 libserf0_0 0.3.0-2 libsigsegv0 2.6-1 libsqlite3_0 3.6.2-1 libssp0 4.3.4-1 libstdc++6 4.3.4-1 libwrap0 7.6-20 login 1.10-10 m4 1.4.13-2 make 3.81-2 man 1.6e-1 mingw-runtime 3.17-1 minires 1.02-1 openssh 5.3p1-1 openssl 0.9.8l-2 openssl-devel 0.9.8l-2 perl 5.10.1-1 readline 6.0.3-2 rebase 3.0.1-1 run 1.1.12-11 sed 4.1.5-2 subversion 1.6.6-2 tar 1.22-1 tcltk 20080420-1 terminfo 5.7_20091114-13 terminfo0 5.5_20061104-11 texinfo 4.13-3 tzcode 2009k-1 w32api 3.14-1 which 2.20-2 xz 4.999.9beta-10 zlib 1.2.3-10 zlib-devel 1.2.3-10 zlib0 1.2.3-10 Use -h to see help about each section --------------060106050607060003040607 Content-Type: text/plain; name="sigthread.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sigthread.c" #include #include #include #include #include void handler(int sig) { printf("got wakeup call (signal %d)\n", sig); } void *thread(void *args) { /* make sure SIGALARM is not blocked */ sigset_t mask; sigemptyset(&mask); pthread_sigmask(SIG_SETMASK, &mask, NULL); /* schedule SIGALRM to cut sleep short */ printf("thread going to sleep\n"); alarm(1); sleep(5); printf("thread done\n"); return NULL; } int main() { /* register the alarm signal handler */ struct sigaction sighandler; sighandler.sa_flags = 0; sighandler.sa_handler = handler; sigfillset(&sighandler.sa_mask); sigaction(SIGALRM, &sighandler, NULL); /* create a thread */ pthread_t tid; pthread_create(&tid, NULL, thread, NULL); /* now block all signals for main thread */ sigset_t mask; sigfillset(&mask); sigdelset(&mask, SIGINT); /* except SIGINT for Ctrl-C bailout */ /* sigdelset(&mask, SIGALRM); * this unblocked gets handler called */ pthread_sigmask(SIG_SETMASK, &mask, NULL); /* now wait for SIGHUP */ printf("main waiting for SIGHUP as %d\n", getpid()); int rc, sig; sigset_t expected; sigemptyset(&expected); sigaddset(&expected, SIGHUP); rc = sigwait(&expected, &sig); printf("sigwait rc %d got signal %d: %d\n", rc, sig, errno); /* gets errno=EINTR if SIGALRM is unblocked above */ /* and wait for the thread */ pthread_join(tid, NULL); /* see what signals are still pending */ /* this segfaults, unless SIGALRM in unblocked above sigset_t pending; sigpending(&pending); printf("pending signals: %x\n", pending); */ printf("main done\n"); return 0; } --------------060106050607060003040607 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --------------060106050607060003040607--