Skip to content

Command::quit calls exit(0) from inside the library, silently killing the host process #160

Description

@HugoFara

quit[] calls exit(0) inside the library (Command.cpp:2967), so it kills any host process, including Python:

f = pyforefire.ForeFire()
try:
    f.execute("quit[]")   # process ends here
finally:
    print("never printed")

The host gets no exception, finally and atexit never run, buffered output is lost, and the exit status is 0, so a CI job reports success.

The error path at Command.cpp:1125 (// TODO supersafe mode ?) also calls quit(), so an internal error can do the same thing.

Fix in #181.

Suggested fix: quit releases the session and returns; the CLI in app/forefire/ decides whether to exit. Line 1125 should return an error instead. Related to #159.


Drafted with Claude Opus 5, reviewed by a maintainer.

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions