On Mon, 19 May 2008, Lorenzo Fiorini wrote:
> After the changing from:
> #elif defined(HB_OS_UNIX)
> {
> static const struct timespec nanosecs = { 0, 1000000 };
> nanosleep( &nanosecs, NULL );
> }
>
> to:
> #elif defined(HB_OS_UNIX)
> {
> struct timeval tv;
> tv.tv_sec = 0;
> tv.tv_usec = 1000;
> select( 0, NULL, NULL, NULL, &tv );
> }
> the "black screen" problem under Centos 5.1 went away.
> Is it the right fix?
If it helps then it's a workaround for problem with Linux kernel
(or glibc nonosleep() implementation) in Centos 5.1 which should
be fixed in this distribution.
> Should I commit it?
You can safely commit it. Using select() in such way is the most
portable method of process freezing for delay less then second in
POSIX systems. So simply change:
#elif defined(HB_OS_DARWIN)
to:
#elif defined(HB_OS_UNIX)
and remove current HB_OS_UNIX section which uses nanosleep() code.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour