Skip to content

signal.SIGINT doesn't always work in off screen rendering mode #400

Open
@cztomczak

Description

@cztomczak

Registering signals using such code:

import signal

signal.signal(signal.SIGINT, exit_gracefully)
signal.signal(signal.SIGTERM, exit_gracefully)

In the screenshot.py example intercepting these signals works fine while web page is loading, but after page loading is complete the exit_gracefully function is never called when pressing ctrl+c.

Modified screenshot.py example with registered signals:
https://gist.github.com/indr/aa269f33968ee8fa0ce60f9c8864776f

Example of registering signals in upstream cefclient:
https://github.com/chromiumembedded/cef/blob/22d2fc50d1fba0d55cad6d43df95854a9dc34e0b/tests/cefclient/cefclient_gtk.cc#L116

For reference issue reported on the CEF Python Forum:
https://groups.google.com/d/topic/cefpython/z3YB3Mt8KrM/discussion

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions