SQLite Forum

Strange CLI .exit issue
Login
The code you showed earlier, which read whatever stream was known as stdin until seeing EOF from it, had the behavior I stated and should not have crashed. You claimed that it solved your problem, implying that it read stdin up to getting EOF rather than "crashing".  I'm just pointing out that such input sucking is going to go on for a long time when stdin is the console input, presumably coming from a typing person, until they indicate end-of-stream as I indicated.

Of course, I cannot speak to "crashing" for code you have not shown.

My preference for programs acting the same when fed by redirected input as when typed at comes from seeing the complications that ensue and increased trouble-shooting inconvenience. You should suit yourself on that, of course. Once you have many parts of a system acting differently according to how they are connected to each other, and find it difficult to debug and reason about, you may appreciate the point.