[Top][All Lists]

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

Re: [Bug-wget] Patch: Make wget abort if post-file does not exist

From: Darshit Shah
Subject: Re: [Bug-wget] Patch: Make wget abort if post-file does not exist
Date: Tue, 12 Mar 2013 13:14:47 +0530

The original patch caused a SIGABRT that I missed.
wget now returns with an exit status of 3.

Uploading the updated patch file and another with the test to ensure the
correct return code.

On Tue, Mar 12, 2013 at 2:03 AM, Giuseppe Scrivano <address@hidden>wrote:

> Thanks for your your patch!  Some comments:
> Darshit Shah <address@hidden> writes:
> > Attaching a patch to make wget abort instead of sending an empty request
> if the file pointed to in --post-file does not exist.
> +              return FILEBADFILE;
> what exit status will be returned by the wget process?
> I am not sure FILEBADFILE is handled by get_exit_status (in exits.c).  I
> think we should ensure the exit status is 3 in this case (File I/O
> error).
> As additional bonus, could you write a simple test case to exercise your
> code?
> You can copy the Test-noop.px file as a starting point then change the
> cmdline to something like (add the new file to the Makefile.am file too):
> my $cmdline = $WgetTest::WGETPATH . " --post-file=nothere
> http://localhost:{{port}}/";;
> Then you can check that the expected_error_code is 3.
> Cheers,
> Giuseppe

Thanking You,
Darshit Shah
Research Lead, Code Innovation
Kill Code Phobia.
B.E.(Hons.) Mechanical Engineering, '14. BITS-Pilani

Attachment: non-existing-post-file.patch
Description: Binary data

Attachment: Test--post-file.patch
Description: Binary data

reply via email to

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