SSH hangs while restarting services
Francois Tigeot
ftigeot at wolfpond.org
Tue Nov 4 14:00:58 UTC 2014
Hi,
On Tue, Nov 04, 2014 at 08:48:03AM +0800, Denny Lin wrote:
>
> Recently I've been trying to restart services remotely using SSH using a
> command instead of entering the shell:
> ssh host "sudo service postgresql restart"
>
> PostgreSQL is able to restart successfully, but SSH just hangs there
> instead of exiting. I've noticed that this seems to affect any command
> which spawns a child process which doesn't exit.
Can you check if it's really ssh which hangs or sudo ?
I have just stumbled upon a sudo bug myself: the child process launched
by sudo-1.8.11 hangs in the manner you just described. The same command
launched by sudo-1.8.10 works fine.
Running sudo /bin/sh and quitting the new shell is enough to verify if
everything's fine or not.
--
Francois Tigeot
More information about the freebsd-ports
mailing list