|
Re: testing codes in erl with running processes: msg#00381lang.erlang.general
>HP Wei writes: > > I have an erl session, in which there is a process running. > > > > I load a testing module which is unrelated to the running process; > > then, > > I type fx(...), without specifying the module name: test:fx(...). > > erl tells me so dutifully. > > But after a few seconds, the running process also exits > > with {badarg...} type of error. > > > > Can the action of testing codes somehow > > interfere with a process running in the background ?? > >If a process is linked to the shell and the shell exits, then that >process will receive an exit signal. An error in the shell causes the >shell process to exit and restart: > > 1> self(). > <0.25.0> > 2> fx(). > ** exited: {undef,[{shell_default,fx,[]}, > 3> self(). > <0.40.0> > >If you don't want that behaviour, make sure your process isn't linked >to the shell process, for instance by starting it via spawn() instead >of spawn_link(). hi, forget about my previous email. I just realized that in my process, I refer to an ets table. And an ets table is associated with the running shell. This should explain why that process dies. If this is the case, I probably have no way to avoid this from happening. The easy way is to develop code in another erl ? HP |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: testing codes in erl with running processes: 00381, HP Wei |
|---|---|
| Next by Date: | Re: testing codes in erl with running processes: 00381, Bengt Kleberg |
| Previous by Thread: | Re: testing codes in erl with running processesi: 00381, HP Wei |
| Next by Thread: | Re: testing codes in erl with running processes: 00381, Bengt Kleberg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |