aMule Forum

English => aMule Help => Topic started by: p.r. on November 14, 2009, 04:12:03 PM

Title: "Download completed" event always logged as "Failed"
Post by: p.r. on November 14, 2009, 04:12:03 PM
I can't understand why status of "Download completed" event is always logged as "Failed"?
Code: [Select]
Failed to execute command `sh -c ed2kQupd' on `Download completed' event.
I know for sure that my script (ed2kQupd) is always executed  successfully.


I tried to change command from `sh -c ed2kQupd'  to `ed2kQupd'  but nothing changed:
Code: [Select]
Failed to execute command `ed2kQupd' on `Download completed' event.
I'm running amuled 2.2.6 on Linux nas.
Title: Re: "Download completed" event always logged as "Failed"
Post by: GonoszTopi on November 14, 2009, 11:07:41 PM
There are a number of reasons wxExecute may return failure, one of them for command-line applications (such as amuled) is if the child (the executed command) finishes too early, i.e. before the caller (amuled) could wait() for it to finish.
Title: Re: "Download completed" event always logged as "Failed"
Post by: p.r. on November 15, 2009, 01:56:14 PM
There are a number of reasons wxExecute may return failure, one of them for command-line applications (such as amuled) is if the child (the executed command) finishes too early, i.e. before the caller (amuled) could wait() for it to finish.
Right you are!
I insert "sleep 1" into script "ed2kQupd"  and get  correct  "Download completed" event status in log: 
Code: [Select]
Command `ed2kQupd' with pid `106' has finished with status code `0'.
But nevertheless  1 second delay is too long, later I'll try run script  with "usleep 250000".
Title: Re: "Download completed" event always logged as "Failed"
Post by: p.r. on November 18, 2009, 04:42:49 PM
"usleep 250000" is too short delay.