[erlang-questions] terminating a gen_server

Anthony Shipman <>
Mon Sep 10 19:13:28 CEST 2007

I've found that I can do exit(Pid, shutdown) where Pid is a gen_server and it 
will nicely shut down, calling Mod:terminate.

I can't see how this works. The server is not trapping exit signals so I would 
expect it to just exit without calling Mod:terminate.

The code in gen_server:loop seems to be deliberately written to support this 
behaviour. Can we rely on it?

Anthony Shipman                    Mamas don't let your babies 
                   grow up to be outsourced.

More information about the erlang-questions mailing list