Code review comment for lp:~rohangarg/apport/fix-for-1282713

Revision history for this message
Martin Pitt (pitti) wrote :

> Gives me : XXX calling xdg-open successful

Ah, thanks. So xdg-open is fine, the two "except" are not triggered, and the actual open_url() forked function exits cleanly. That's also consistent with os._exit() not making any difference. So the exit 1 somehow happens during cleanup in some atexit/destructors.

Can you please try what happens with this:

        except Exception as e:
            os.write(w, str(e))
            sys.exit(1)
+ os._exit(0)

I. e. just append the os._exit(0) at the very end of open_url(). That circumvents the cleanup handlers, which is a good idea anyway because that's just a forked child, not the real application. This also ought to make the setdestroyonexit() unnecessary. Crossing fingers :-)

« Back to merge proposal