bug-wget
[Top][All Lists]
Advanced

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

[Bug-wget] Re: [Patch] added new feature "watch for parent process termi


From: Dmitry Koterov
Subject: [Bug-wget] Re: [Patch] added new feature "watch for parent process termination"
Date: Tue, 28 Dec 2010 13:13:26 +0300

...could you please give comments/notices?

Giuseppe Scrivano said to me recently: "Your patch seems interesting, but I
would like to listen to more opinions.  Do you mind to re-send it to
address@hidden"


On Mon, Dec 27, 2010 at 9:37 PM, Dmitry Koterov <address@hidden>wrote:

> ...here is a diff for newer 1.11.4 (attached).
> Hope it is compatible with 1.12 too.
>
>
>
> On Mon, Dec 27, 2010 at 6:58 PM, Dmitry Koterov <address@hidden>wrote:
>
>> Hello.
>>
>> A lot of people use wget as auxillary program to organize robust (and
>> resumable) background downloading in their programs.
>>
>> E.g. I execute wget via system() or exec() in my program and wait for its
>> termination in the background doing other things in parallel. But if my
>> program is accidently terminated (e.g. killer or died on unexpected error),
>> wget process continues to run in the background, and I have no chance to
>> terminate it, because my program is dead already.
>>
>> I added a new feature to wget: "--watchpid=PID" key (works in Windows and
>> *nix).
>>
>> $ wget --watchpid=<my_pid_here> ...
>>
>> If specified, this key makes wget to die if the process with
>> PID=<my_pid_here> is dead. So I may pass parent process PID to wget and be
>> sure that if my program dies, background downloading will also stop.
>>
>> Hope the attached patch will be useful. I'll be happy to see this patch
>> included to the mainstream.
>>
>>
>>
>


reply via email to

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