Skip to content

Keep the daemon alive when user code raises a BaseException subclass #13

Description

@protostatis

Summary

run_code() handles SystemExit, KeyboardInterrupt, and Exception, but not remaining BaseException subclasses. For example, raise GeneratorExit() terminates the daemon and leaves the client with a pending command.

Reproduction

test_wait_issues.sh T9 reproduces this behavior and reports the server died while the command was pending.

Expected

Unexpected user-code exceptions should become a normal command error; the persistent session should remain usable.

Suggested direction

Add a final except BaseException after the specialized handlers and serialize the traceback into the usual error result.

Priority context

This is a low-frequency robustness issue, but the fix should be small.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions