Re: 2.5.51 nanosleep fails

Jim Houston
2002-12-11T20:57:38Z

Marco d'Itri wrote:
> nanosleep fails after being interrupted:
>
> [...]
> nanosleep({1, 0},
> [1]+ Stopped strace tail -f /var/log/uucp/Log
> md@wonderland:~$ fg
> strace tail -f /var/log/uucp/Log
> <unfinished ...>
> --- SIGCONT (Continued) ---
> <... nanosleep resumed> 0) = -1 ENOSYS (Function not implemented)>
>
> This can be reliably reproduced.

Hi Marco, Everyone,

I was able to reproduce this issue. It happens on all the
kernels I tried including a stock Redhat kernel. This is just
an idiosyncrasy of strace. In this case both the strace and
tail are sent a SIGTSTP when they are put into the background.
Its not suprising that this might confuse strace.

I also tried this with a program which just does a long
nanosleep. Strace still shows a return of ENOSYS but the
program actually gets the correct EINTR.

Jim Houston - Concurrent Computer Corp.