Re: [Sugar-devel] metacity is not reaped, bug #4958

2016-04-20 Thread Manash Raja
Hi James,

Thanks, :)

I updated the logic flow and also included a Popen.communicate() call to
remove the waiting defunct process.

Please check.
https://github.com/sugarlabs/sugar/pull/682

I was able to reproduce the error and after the patch there was only one
process for metacity with Sl+ status as desired. :)



On Wed, Apr 20, 2016 at 11:47 AM, James Cameron  wrote:

> Thanks, good start.
>
> I've updated the bug with a reproducer, and reproduced twice, once on
> Ubuntu 16.04 and once on Fedora 23 SoaS.
>
> I've tried your patch; small logic error causes two instances of
> metacity to start, and the second one (correctly) exits.  The process
> is still not reaped.
>
> Your patch moves the Popen _and_ the Wnck call to a timeout callback;
> it would be better to make them into a utility function, then;
>
> - call the utility function during startup,
>
> - set a new timeout function to call poll(), return true if the
>   process still exists,
>
> - when poll() shows process has terminated, call the utility function
>   again, but still return true.
>
> Returning true from a timeout callback function tells GObject to call
> again after the next period.
>
> On Wed, Apr 20, 2016 at 11:20:33AM +0530, Manash Raja wrote:
> > Hi,
> >
> > I was looking at this bug: [1]https://bugs.sugarlabs.org/ticket/4958
> >
> > How can I create the bug on my machine to test?
> >
> > Even though I created a patch, can you please verify:
> > [2]https://github.com/ManashRaja/sugar/commit/
> > d1d3c852adb6a9a2c10942ed6a96f2c4bb7ed61b
> >
> > Thanks
> > Manash
> >
> > References:
> >
> > [1] https://bugs.sugarlabs.org/ticket/4958
> > [2]
> https://github.com/ManashRaja/sugar/commit/d1d3c852adb6a9a2c10942ed6a96f2c4bb7ed61b
>
> > ___
> > Sugar-devel mailing list
> > Sugar-devel@lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
> --
> James Cameron
> http://quozl.netrek.org/
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] metacity is not reaped, bug #4958

2016-04-20 Thread James Cameron
Thanks, good start.

I've updated the bug with a reproducer, and reproduced twice, once on
Ubuntu 16.04 and once on Fedora 23 SoaS.

I've tried your patch; small logic error causes two instances of
metacity to start, and the second one (correctly) exits.  The process
is still not reaped.

Your patch moves the Popen _and_ the Wnck call to a timeout callback;
it would be better to make them into a utility function, then;

- call the utility function during startup,

- set a new timeout function to call poll(), return true if the
  process still exists,

- when poll() shows process has terminated, call the utility function
  again, but still return true.

Returning true from a timeout callback function tells GObject to call
again after the next period.

On Wed, Apr 20, 2016 at 11:20:33AM +0530, Manash Raja wrote:
> Hi,
> 
> I was looking at this bug: [1]https://bugs.sugarlabs.org/ticket/4958
> 
> How can I create the bug on my machine to test?
> 
> Even though I created a patch, can you please verify:
> [2]https://github.com/ManashRaja/sugar/commit/
> d1d3c852adb6a9a2c10942ed6a96f2c4bb7ed61b
> 
> Thanks
> Manash
> 
> References:
> 
> [1] https://bugs.sugarlabs.org/ticket/4958
> [2] 
> https://github.com/ManashRaja/sugar/commit/d1d3c852adb6a9a2c10942ed6a96f2c4bb7ed61b

> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


-- 
James Cameron
http://quozl.netrek.org/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] metacity is not reaped, bug #4958

2016-04-19 Thread Manash Raja
Hi,

I was looking at this bug: https://bugs.sugarlabs.org/ticket/4958

How can I create the bug on my machine to test?

Even though I created a patch, can you please verify:
https://github.com/ManashRaja/sugar/commit/d1d3c852adb6a9a2c10942ed6a96f2c4bb7ed61b

Thanks
Manash
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel