• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

12.4.25 Embedding SWI-Prolog in other applications
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • Embedding SWI-Prolog in other applications
            • PL_initialise()
            • PL_winitialise()
            • PL_is_initialised()
            • PL_set_resource_db_mem()
            • PL_toplevel()
            • PL_cleanup()
            • PL_cleanup_fork()
            • PL_halt()
            • Threading, Signals and embedded Prolog
    • Packages
Availability:C-language interface function
bool PL_halt(int status)
Terminate the Prolog process as halt/1. The behaviour depends on several flags:
PL_HALT_WITH_EXCEPTION
When specified, try to raise unwind(halt(status)). If this is not possible, ignore this flag. Return false.
PL_CLEANUP_NO_RECLAIM_MEMORY
Never reclaim the memory, leaving this task to the OS. This is the default unless the system is compiled for debugging.
PL_CLEANUP_NO_CANCEL
Do not allow hooks to cancel halting the system.

Unless PL_HALT_WITH_EXCEPTION was specified and effective, Clean up the Prolog environment using PL_cleanup() and if successful call exit() with the status argument. Returns true if exit was cancelled by PL_cleanup().238Versions up to 9.3.12 returned false on cancel. If necessary, the two behaviours can be distinguished based on the existence of the PL_HALT_WITH_EXCEPTION macro.

ClioPatria (version V3.1.1-51-ga0b30a5)