Skip to content

remove std::exit - #1161

Closed
piallai wants to merge 4 commits into
leejet:masterfrom
piallai:remove-exit-function
Closed

remove std::exit#1161
piallai wants to merge 4 commits into
leejet:masterfrom
piallai:remove-exit-function

Conversation

@piallai

@piallai piallai commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

safer regarding memory allocation

Caution: indentation was not changed in 'main', for diff clarity sake

safer regarding memory allocation
exception for -h about invalid arg (in common.hpp parse_options)
piallai added a commit to piallai/stable-diffusion.cpp that referenced this pull request Jan 4, 2026
@leejet

leejet commented Jan 6, 2026

Copy link
Copy Markdown
Owner

Since sd-cli is a CLI-only program, using std::exit in argument parsing is reasonable and not a problem.

@piallai

piallai commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

Indeed. Actually std::exit has a radical behaviour (hard exit no matter what) that is not compatible with my fork. So it was just to propose a way to also make the repo safer in a general manner. But you're right, it does not change much the original cli behaviour.

@piallai piallai closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants