I connected Node A (which contains a gen_server that monitors yaws processes) to a Node B which runs YAWS.
gen_server's handle_info does receive 'EXIT' and 'DOWN' messages from remote nodes but not particularly from yaws processes. However when I stop yaws the gen_server does receive a message containing something like "no connection"
Now the question is how do I receive 'DOWN' messages from yaws processes?
There's nothing special about a Yaws process compared to other Erlang processes. It's likely that you're expecting a Yaws process that receives requests to die when it finishes dispatching or handling a request, but that's not how it works. Rather, by default Yaws keeps a pool of processes around to handle requests and it reuses them for multiple requests.
If you want to disable the process pool, set the Yaws config variable acceptor_pool_size
to 0 in the global section of your Yaws configuration.