added hangup function for line discipline itself