[erlang-questions] Multiple gen_fsm instances and gen_tcp:accept/1

Joern <>
Wed Oct 17 19:09:51 CEST 2007

Thanks tty, thanks Vance,

On 10/17/07, Vance Shipley <> wrote:

> On Wed, Oct 17, 2007 at 06:08:58PM +0200, Joern wrote:

> Create a simple_one_for_one supervisor.  Then start the workers
> with supervisor:start_child/2.

Seems right at first glance. Just to sketch it out: I write a
gen_server which starts in an infinite loop. It adds instances of the
gen_fsm each time gen_tcp:accept/1 returns to it's sibling in the
supervision tree, a simple_one_for_one supervisor. Am I correct?

Another (unrelated) thought: for such a simple case I do not need a
gen_server, a simple supervisable process should do. Is there a reason
why there is not a behaviour such as e.g. 'plain' for such cases in
the OTP?

Best regards,


More information about the erlang-questions mailing list