This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
1.3.22: Bug Pipereader with demo (WIN2K)
- From: heiko <heiko at hexco dot de>
- To: cygwin at cygwin dot com
- Date: Fri, 1 Aug 2003 15:46:24 +0200
- Subject: 1.3.22: Bug Pipereader with demo (WIN2K)
- Organization: Eissfeldt Consulting
Hi,
changes introduced in cygwin 1.3.18 broke my application cdda2wav from the
cdrtools package. cygwin release 1.3.17 worked well.
Since that release my app and the whole windows GUI
as well freezes when the pipe reader has to wait...
Just checked that with version 1.3.22-1
The following minimal test case demonstrates the behaviour.
CAUTION: Your machine will freeze!!
Please forward this to Christopher Faylor.
(Chris, I have looked at the diff between 1.3.18 and 1.3.17,
but have no clue what it is; probably in fhandler::read_raw or
fhandler_pipe::read)
Good bug hunting luck, and thanks,
Heiko Eißfeldt
#include <stdio.h>
#include <unistd.h>
#include <windows.h>
int main(void)
{
/* initialize pipes */
int pipefdp2c[2];
int pipefdc2p[2];
if (pipe(pipefdp2c) < 0) {
perror("cannot create pipe parent to child");
exit(1);
}
if (pipe(pipefdc2p) < 0) {
perror("cannot create pipe child to parent");
exit(1);
}
if (0 == fork()) {
/* child */
close(pipefdp2c[0]);
close(pipefdc2p[1]);
} else {
int dummy;
/* parent */
/* set priority class */
if (FALSE == SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS)) {
fprintf(stderr, "No realtime priority possible.\n");
}
/* set thread priority */
if (FALSE == SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST)) {
fprintf(stderr, "Could not set realtime priority.\n");
}
close(pipefdp2c[1]);
close(pipefdc2p[0]);
read(pipefdp2c[0], &dummy, 1);
}
return 0;
}
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/