On 01/10/2012 09:19 PM, Dmitry V. Levin wrote:
>> While at it, I made it so that we do display returned value/errno.
>> I see no point in hiding it and showing uninformative "= ?" instead.
>
> Is there any actual difference?  Is there any case when sigreturn() may
> "return" something different from EINTR?

Yes. -EINTR return means that the interrupted system call won't be restarted.
It looks like this:

rt_sigsuspend([ABRT])                   = ? ERESTARTNOHAND (To be restarted)
--- {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=134513920, 
ptr=0x8048500}} (Alarm clock) ---
alarm(1)                                = 0
sigreturn() (mask now [ABRT])           = -1 EINTR (Interrupted system call)

Whereas the case when syscall is restarted looks like this:

read(0, 0x8121750, 1024)                = ? ERESTARTSYS (To be restarted)
--- {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=134513920, 
ptr=0x8048500}} (Alarm clock) ---
alarm(1)                                = 0
sigreturn() (mask now [ABRT])           = 3
read(0, 0x8121750, 1024)...

This is a potentially useful bit of information we weren't showing.

-- 
vda

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to