bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] 2 Suggestions (bi-directional retry and user interrup


From: Scott D
Subject: Re: [Bug-ddrescue] 2 Suggestions (bi-directional retry and user interruption exit code)
Date: Thu, 20 Feb 2014 22:26:37 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

This is with non-modified ddrescue. I was looking at the return value raw, not using the proper WEXITSTATUS, and found it to not be zero if terminated by ctrl-c. I believe the value would was 0x0200, showing the SIGNT as the high order byte. After looking into it, I do not believe this is normal behavior for a process that handles the SIGNT on its own, only something that I stumbled onto using my system and thought it would work all the time. So I do believe that the only sure way to tell if ddrescue was terminated by the user is to make it exit with a nonzero value.

On 2/20/2014 12:52 PM, Antonio Diaz Diaz wrote:
Scott D wrote:
I also did not realize that the method that I use in C to tell if ddrescue exited by termination does not work on all systems. I have revised my code to use WTERMSIG and WEXITSTATUS as opposed to the not so correct slop I had previously written. It works fine in Ubuntu. But I tested it on Fedora and on a Mac (in virtual machines), and it doesn't work on them. It would appear that Ubuntu carries over the WTERMSIG after ddrescue is terminated, but the other systems do not.

But, have you modified ddrescue to terminate by raising SIGINT when the user hits Ctrl-C?

If you have modified ddrescue and it does not work on all systems, I think the only way to tell if ddrescue was terminated by the user is to make it exit with a nonzero value.

_______________________________________________
Bug-ddrescue mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-ddrescue





reply via email to

[Prev in Thread] Current Thread [Next in Thread]