Wang Lihe
unread,Feb 27, 2013, 5:40:44 PM2/27/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to erlang...@googlegroups.com
今天在debug的时候,心血来潮,这样搞了一下,发现抛了异常。
看了man,讲到exit(Reason)时,确实会收到异常,但是没有讲到背后的原因。而exit(Pid,normal)原则上是不应该使任可进程产生异常的。
我又加了link其他的进程试验,其他进程要么没反应,要么收到普通的{'EXIT',_,normal},看起来是正常的。
到stackoverflow上搜了一下,有人说这是个bug!!
我觉得这应该不是bug,到bif.c里去看exit_2的实现,表示没有完全看懂,不清楚。
我觉得exit(reason)和exit(pid,reason)底层应该是一样的,甚至前者调用了后者,exit自己这个进程,就是会让自身产生一个异常,是不是被设计这样暂且不论,群里有人能将异常产生的机制上的原因讲一下么?
有人有过同样的困惑么?