Dear list,<br><br>I start a gen_server and in the initialization i set process_flag(trap_exit, true), obviously to allow the gen_server to catch child processes crashes.<br><br>Whenever i start this gen_server from the shell and then issue an error in the shell, the gen_server exits too:<br>
<br>12>abc().<br>** exception error: undefined shell command abc/0<br><br>=ERROR REPORT==== 9-Apr-2011::14:16:51 ===<br>** Generic server testserver terminating <br>** Last message in was {'EXIT',<0.272.0>,<br>
                               {{shell_undef,abc,0},<br>                                [{shell,shell_undef,2},<br>                                 {erl_eval,local_func,5},<br>                                 {shell,exprs,7},<br>
                                 {shell,eval_exprs,7},<br>                                 {shell,eval_loop,3}]}}<br><br>I believe that this behavior of the server exiting because its parent exits is 
supposed to happen, since trap_exit doesn't let the gen_server trap its parent
 process exiting. What I believe happens is that the shell 'crashes' and so does the child process 'testserver'.<br><br>Am I correct in my assumptions, or am I missing a fundamental point here?<br><br>Thank you,<br>
<br>r.<br>