Subject: Re: Problem with "screen -r"
To: None <current-users@NetBSD.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: current-users
Date: 06/30/2006 22:32:12
--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Tom Spindler --> current-users (2006-06-29 18:24:19 -0700):
[...]
> However, I don't think it's the compiler - my -current system with
> gcc 3.3.6 produces a similarly broken screen. What's worrisome is this:
>
> on older -current:
> - both sockets and fifos usable. let's take fifos.
> configure: checking select return value...
> - select is ok
>
> on newer:
> - both sockets and fifos usable. let's take fifos.
> configure: checking select return value...
> - select can't count
>
> This definitely seems like a regression.
The attached file is a stripped down version of the program which
causes screen's configure script to print this "select can't count"
message. It doesn't matter whether it's built using gcc 3 or 4: the
resulting executable returns 1 on a system from 2006-06-25, but returns
0 on that from 2006-06-19.
HTH somehow,
Jukka
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="conftest.c"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
char *nam = "/tmp/conftest20904";
main()
{
fd_set f;
(void)alarm(5);
if (mkfifo(nam, 0777))
exit(1);
close(0);
if (open(nam, O_RDWR | O_NONBLOCK))
exit(1);
if (write(0, "TEST", 4) == -1)
exit(1);
FD_SET(0, &f);
if (select(1, &f, 0, 0, 0) == -1)
exit(1);
if (select(1, &f, &f, 0, 0) != 2)
exit(1);
exit(0);
}
--OgqxwSJOaUobr8KG--