|
From: | Scott Dwyer |
Subject: | Re: [Bug-ddrescue] 2 Suggestions (bi-directional retry and user interruption exit code) |
Date: | Mon, 24 Feb 2014 21:53:16 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 2/24/2014 10:23 AM, Antonio Diaz Diaz wrote:
Forgive me, for this would be the first time I have used a patch like this. I am using this on version 1.18-pre7. First, I was unable to get this patch to work automatically, possibly my fault or the fact that I was copying it from the email, or a combination of both. I am not really concerned about this problem, but here is the error anyway:--- rescuebook.cc~ 2014-02-01 00:28:19.000000000 +0100 +++ rescuebook.cc 2014-02-24 16:00:00.000000000 +0100 @@ -736,7 +736,6 @@ else { if( retval == 0 ) current_status( finished ); - else if( retval < 0 ) retval = 0; // interrupted by user if( !extend_outfile_size() ) // sparse or -x option { show_error( "Error extending output file size." ); @@ -754,5 +753,7 @@ if( !read_logger.close_file() ) show_error( "warning: Error closing the reads logging file." ); if( final_msg() ) show_error( final_msg(), final_errno() ); - return retval; + if( retval >= 0 ) return retval; + std::signal( SIGINT, SIG_DFL ); + std::raise( SIGINT ); }
patching file rescuebook.cc Hunk #1 FAILED at 736. patch unexpectedly ends in middle of line Hunk #2 FAILED at 754. 2 out of 2 hunks FAILED -- saving rejects to file rescuebook.cc.rej
So I patched it manually, which I would think I did correctly as it seems pretty strait forward, and then get this result from make:
This result makes me think you left a little something out somewhere. Or I did something really wrong somehow. I am not in a big hurry for this, so whenever you get the time is fine with me.g++ -Wall -W -O2 -c -o rescuebook.o rescuebook.cc rescuebook.cc: In member function ‘int Rescuebook::do_rescue(int, int)’: rescuebook.cc:757:3: error: ‘signal’ is not a member of ‘std’ rescuebook.cc:757:16: error: ‘SIGINT’ was not declared in this scope rescuebook.cc:757:24: error: ‘SIG_DFL’ was not declared in this scope rescuebook.cc:758:3: error: ‘raise’ is not a member of ‘std’rescuebook.cc:759:3: warning: control reaches end of non-void function [-Wreturn-type]make: *** [rescuebook.o] Error 1
Scott
[Prev in Thread] | Current Thread | [Next in Thread] |