Thanks Dave, no clue, maybe some bug got fixed in a underlying lib that caused 
this bug to manifest itself.

Seb


Message: 1
Date: Wed, 19 Aug 2015 23:32:45 -0700
From: David Anderson <[email protected]>
To: [email protected] 
Subject: Re: [boinc_dev] Wrapper and  incorrect child return code
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed

Thanks; I committed something equivalent to this.

I'm confused about how the wrapper *ever* worked on Unix;
wouldn't it treat every sub-task as a failure?

-- David

On 23-Jul-2015 12:26 PM, S?bastien Lauzier wrote:
> Hi,
>
> I'm currently working on a project that's using the wrapper on linux. I made 
> some changes to the wrapper specifically for the app it's calling. After 
> those changes, when I started testing the wrapper was finishing in error and 
> logging an error code for the app it called. The strange thing was that the 
> app started fine, the log files showed that everything worked correctly, no 
> warning or error. I ended up reading the doc for waitpid() used in the poll 
> method of the TASK class and found that WEXITSTATUS(status) return the exit 
> status of the child. The value returned from WEXITSTATUS(status) to determine 
> if the child returned an error or finish successfully and it matched expected 
> value for the different test I ran.
>
> I didn't do extensive testing, only on 2 different computer running Ubuntu 
> 14.04 64b.
>
> I'm surprise nobody encountered that prior to us and I wonders if it's the 
> way we are using the wrapper that causing this.
>
> I made the following changes in wrapper.cpp, feedback, review would be 
> appreciated.
>
> if (task.poll(status)) {
> +  //get the child exit status
> + if (WIFEXITED(status)) {
> +     status = WEXITSTATUS(status)
> +  }
>    if (status) {
> ....
>
> I can provide a proper patch if needed.
>
> Seb
>
> _______________________________________________
> boinc_dev mailing list
> [email protected] 
> http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev 
> To unsubscribe, visit the above URL and
> (near bottom of page) enter your email address.

_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to