Re: 2.5.51 nanosleep fails

Jim Houston (jim.houston@attbi.com)
Wed, 11 Dec 2002 16:05:20 -0500


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/