sleep (UINT_MAX) broken

Petter Reinholdtsen pere@hungry.com
Sat Jun 28 16:20:00 GMT 2003


[Andreas Jaeger]
> This small program returns directly with:
> gromit:~/tmp:[0]$ ./a.out 
> Ret is :4294967295

The same happen on HP/UX 11.22 The manual page for sleep(3) on HP/UX
says that 'seconds must be less than 2^31'.

Solaris 8 behaves differently.  It returns immediately with ret = 0:

  % ./a.out
  Ret is :0
  %

Looking at
<URL:http://www.opengroup.org/onlinepubs/007904975/functions/sleep.html>,
it is hard to tell if this is supposed to work or not.  I guess it
should.



More information about the Libc-alpha mailing list