The shell is not relevant. The shell program is not involved after the "other program" (the SQLite3 CLI in this case) begins executing. The shell is a program that exists merely for the convenience of allowing the user to interact with the Operating System in order to tell the operating system what program to run. Once the that other program begins executing the shell program is no longer involved in interactions between that program, the user, or the Operating System. Once the other program exits then the user is able to interact with the shell program once more.