HOWEVER: killing tor in 30 seconds seems to me a little harsh on all those anonymous connections that were previously going through my exit relay. Can those clients (if they need) pick up their connections after about 3 minutes? It appeared that all connections were completely gone when I finally got tor restarted
As soon as your relay goes away the circuits will be cut, and the streams that clients had on those circuits will be cut too. Whether those clients will automatically reconnect those streams on new circuits depends on the application.
Is there some longer term sense in having a SOCKS protocol enhancement to have the SOCKS/TOR server notify applications connecting through it, that it intends to shutdown the relay/socks facility at X minutes into the future?
In the tor relays itself, this would of course need some TOR control channel or protocol where the 'relay reboot in X minutes' gets propagated back to the end users of the channels through this relay/ exit node.
Although 'reconnect' is robust enough, prima facie, a little more niceness for the users would be a good thing, I'd think.