Motivated by How can I change my command to run without superuser privilleges but with the changed limit value?, in a bash shell, if I run
exec su $LOGNAME && sleep 100
will the sleep command ever be executed?
I think not, because
exec su $LOGNAME will replace the shell in the current process with another shell. When I exit the new shell normally (for
&&), the process terminates and there is no process to execute the sleep command.