if you source a shell script that has the exit keyword in it, your process ends and you have to login again. No regular user command, like ls, awk, etc. will do that.
Code:
# sourcing a script note the leading dot
. myscript
# sourcing a script on linux - you can do this as well as the dot notation
source myscript
# this will not log you out
myscript