Re: keymap and standard input

"Axel Dörfler" <[email protected]>
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <26258945182-BeMail@zon>
Hi Jérôme,

Jérome DUVAL <[email protected]> wrote:
> i have a bug with keymap tool which maybe exposes another bug in the 
> kernel :
> 
> "keymap -l" blocks on R5 waiting on stdin, but not on Haiku. I tried 
> to link against 
> libio.so in R5 and i still don't reproduce it.
> 
> So i think the bug is at a lower level, ie in the "kernel".
> 
> Any thoughts of what can happen ?

No. I've written a small test application, and it behaves identical 
under BeOS and Haiku (with the one exception that CTRL-D don't come 
through, and you cannot quit it unless you're using pipes).
It's attached; it would be great if you could reproduce your problems 
so that I can easily see what's wrong :-)

Bye,
   Axel.
stdin_test.cpp (text/x-source-code, 278 B)
#include <stdio.h>
#include <errno.h>
#include <string.h>


int
main(int argc, char **argv)
{
	char buffer[1024];
	int i = 0;
	while (fgets(buffer, sizeof(buffer), stdin) != NULL) {
		printf("%ld: %s\n", i++, buffer);
	}
	printf("errno = %s\n", strerror(errno));

	return 0;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.