[PATCH 4/4] decode_poll: Decode timeout for interrupted syscall

Dmitry V. Levin ldv at altlinux.org
Wed Jul 23 21:58:26 UTC 2008


2008-04-19  Dmitry V. Levin <ldv at altlinux.org>

	* stream.c (decode_poll): Decode timeout for interrupted syscall.
---
 strace/stream.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

--- a/strace/stream.c
+++ b/strace/stream.c
@@ -353,6 +353,13 @@ decode_poll(struct tcb *tcp, long pts)
                 const char *flagstr;
 		unsigned int cumlen;
 
+		if (pts && is_restart_error(tcp)) {
+			strcpy(outstr, "left ");
+			sprint_timespec(outstr + strlen(outstr), tcp, pts);
+			tcp->auxstr = outstr;
+			return RVAL_STR;
+		}
+
 		if (syserror(tcp))
 			return 0;
 		if (tcp->u_rval == 0) {


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20080724/b7da9095/attachment.bin>


More information about the Strace-devel mailing list