SQLite Forum

Strange CLI .exit issue
Login
I see only two improvable aspects to your "fix".

One is that for never-ending stream producers, which keep their output open and keep writing to it sometimes instead of closing it, your fixed shell will never terminate. Whether that is correct depends on expectation, which is a bit vague now.

The other is that the same treatment would logically apply to the .quit meta-command. Unless, of course, that is to differ for some reason.

I cannot see any other problems your "fix" creates, beyond the issue with defeating broken pipe detection already mentioned.