kill -s SIGHUP [pid]
Should completely kill that terminal session and effectively hang up that session.
So as with other answers the command
ps -ef | grep sleep should get you the
pid you need to send the signal to.
-s tells the command that I am wanting to specify the signal to use, in my case SIGHUP.
To clarify why I have chosen to suggest the use of
kill -s SIGHUP [pid] (or
ppid as suggested by peth) I will enlist the help of Wikipedia which states:
On POSIX-compliant platforms, SIGHUP is a signal sent to a process when its controlling terminal is closed. (It was originally designed to notify the process of a serial line drop). SIGHUP is a symbolic constant defined in the header file signal.h.
With the decline of access via serial line, the meaning of SIGHUP has changed somewhat on modern systems, often meaning a controlling pseudo or virtual terminal has been closed.
I have found a good number of programs that, upon their terminal being killed, will themselves fully terminate and I believe that the bash shell (running the sleep command) would be no different in this case.