Skip to content

Document (in?)ability to exit a program #19245

Closed
@zslayton

Description

@zslayton

Rust doesn't seem to provide a means of cleanly exiting the process apart from programmatically ending all of one's tasks and then allowing the main task to run to completion. Some folks are turning to std::libc::exit as an alternative, which @chris-morgan has pointed out might have undesirable consequences.

This feature is common in many other languages:

  • exit() in C
  • System.exit() in Java
  • sys.exit() in Python
  • os.Exit() in Go

It may be worthwhile to document why it is impractical for Rust to provide it as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions