As those above me has said, if you're trying todo CTRL+T when the shell is running it'll shutdown the computer, if you however don't want this behaviour you could easily override the event function like this.
local pullEvent = os.pullEvent --# Create a backup of the old os.pullEvent
os.pullEvent = function( ... )
    local e = { os.pullEventRaw( ... ) }
    if e[1] == "terminated" then
        local program = shell.getRunningProgram() --# Get the current program running
        if program ~= "" then
            error( "Terminated", 0 ) --# Only throw the error "Terminated" when the program is equal to an empty string, which it returns if the program is the shell
        end
    end
    return unpack( e ) --# Return the event
end
I'm not 100% sure, but I believe that shell.getRunningProgram returns an empty string when it's the shell that's running, someone can correct me if I'm wrong.
But anyway, this would basically allow it to terminate regular programs, but not shutdown the computer if you're doing CTRL+T, that's because it doesn't throw an
error when it's in the shell.
Another thing you should take a note on is that I haven't tested this code-snippet, so bare that in mind if it doesn't work.