<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>I realize that, but just by reading my code I am not able to establish where a port is being spawned? I am doing an erlang:ports() call in a tight loop but do not see the PID in question.</div>
<div>Is  there some utility/function that will list all the ports that have been in existence for a specified period of time ( either currently alive or recently exited)?</div>
<div>If not, is there some utility/debugger that would help me with this?</div>
<div><br>
</div>
<div>Thanks.</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Dmitry Kolesnikov <<a href="mailto:dmkolesnikov@gmail.com">dmkolesnikov@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, August 21, 2014 at 10:08 PM<br>
<span style="font-weight:bold">To: </span>Devdutt Sheth <<a href="mailto:dsheth@imprivata.com">dsheth@imprivata.com</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>" <<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [erlang-questions] Mystery exit message in ejabberd_odbc<br>
</div>
<div><br>
</div>
<div>
<div dir="auto">
<div>If port exit signal is delivered to you process then it is an port owner. Should you be able to trace the place where it is created at given code?<br>
<br>
Best Regards,
<div>Dmitry >-|-|-(*></div>
<div><br>
</div>
</div>
<div><br>
On 22.8.2014, at 0.53, Devdutt Sheth <<a href="mailto:dsheth@IMPRIVATA.com">dsheth@IMPRIVATA.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div><font face="Calibri,sans-serif">I seem to be getting a ton of - </font><span style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">{'</span><span class="t" style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">EXIT</span><span style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">',</span><span class="t" style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">#<span class="t">Port</span></span><span style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><</span><span class="t" style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span class="t">0</span>.<span class="t">1079543</span></span><span style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">></span><span style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">,</span><span class="t" style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">normal</span><span style="background-color: rgb(255, 255, 255);"><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">}
 ( the pid of course varies) messages in my ejabberd_odbc message queue. </span></font></span></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">I</span><span style="background-color: rgb(255, 254, 254);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">
 understand that since we have process_flags(trap_exit, true) EXIT signals from linked processes are turned into messages and placed
</span></span></font></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">I</span></font><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="background-color: rgb(254, 253, 253);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">n
 ejabberd_odbc’s message queue. </span></span></font></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="background-color: rgb(253, 252, 252);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">My question is –
</span></span></font></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="background-color: rgb(252, 251, 251);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">How do we determine what exactly is
</span></span></font><span class="t" style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">#<span class="t">Port</span></span><span style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><</span><span class="t" style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span class="t">0</span>.<span class="t">1079543</span></span><span style="color: rgb(51, 51, 51); font-family: 'Droid Sans Mono', Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 16px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">>
 - doing/executing? </span></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">I</span></font><span style="background-color: rgb(255, 254, 254);"><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">
 obviously cannot do a port_info on this PID since it has already exited, nor am I able to see when it is spawned. I have tried to print out all the ports in the vm</span></font></span></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="background-color: rgb(254, 253, 253);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">via a call to erlang:ports() every second,
 but I do not see the port that I am receiving the exit message from. This leads me to believe that the port exists for a very brief period ( maybe atomically).
</span></span></font></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="background-color: rgb(253, 252, 252);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">Any clues on how I can track down the
 source of this exit message?</span></span></font></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="background-color: rgb(253, 252, 252);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;"><br>
</span></span></font></div>
<div><font color="#333333" face="Droid Sans Mono,Consolas,Monaco,Courier New,Courier,monospace"><span style="background-color: rgb(253, 252, 252);"><span style="font-size: 12px; line-height: 16px; white-space: pre-wrap;">Thanks.</span></span></font></div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>erlang-questions mailing list</span><br>
<span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br>
<span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br>
</div>
</blockquote>
</div>
</div>
</span>
</body>
</html>