Fun with open_port

Shawn Pearce <>
Sun Mar 21 02:50:57 CET 2004


My observations are below.  I ran this on a Gentoo Linux box running:

Linux version 2.4.20-xfs-r4 () \
	(gcc version 3.2.3 20030422 \
		(Gentoo Linux 1.4 3.2.3-r3, propolice)) \
	#2 SMP Sat Dec 6 16:35:29 EST 2003

My erlang installation is the R9C-r2 ebuild.

Short is, I'm not seeing what you are, and I shouldn't either, nobody
should.  Compiling and loading a module should have no bearing on
the exit_status message being delivered by a port program, and the
port program should not be creating zombies...  perhaps something is
wrong with your operating system?


Erlang (BEAM) emulator version 5.3 [source] [hipe] [threads:0]

dreck).
./dreck.erl:5: syntax error before: ')'
./dreck.erl:2: function r/0 undefined
error
2> c(dreck).
{ok,dreck}
3> dreck:r().
{#Port<0.62>,{exit_status,0}}
4> dreck:r().
{#Port<0.63>,{exit_status,0}}
5> dreck:r().
{#Port<0.64>,{exit_status,0}}
6> dreck:r().
{#Port<0.65>,{exit_status,0}}
7> dreck:r().
{#Port<0.66>,{exit_status,0}}
8> dreck:r().
{#Port<0.67>,{exit_status,0}}
9> dreck:r().
{#Port<0.68>,{exit_status,0}}
10> dreck:r().
{#Port<0.69>,{exit_status,0}}
11> dreck:r().
{#Port<0.70>,{exit_status,0}}
12> dreck:r().
{#Port<0.71>,{exit_status,0}}
13> c(dreck).
{ok,dreck}
14> dreck:r().
{#Port<0.74>,{exit_status,0}}

Gerd Flaig <> wrote:
> Gerd Flaig <> writes:
> 
> >    % erl
> >    Erlang (BEAM) emulator version 5.3 [source] [hipe] [threads:0]
> >    
> >    Eshell V5.3  (abort with ^G)
> >    1> dreck:r().
> >    {#Port<0.30>,{exit_status,0}}
> >    2> dreck:r().
> >    {#Port<0.32>,{exit_status,0}}
> >    3> dreck:r().
> >    {#Port<0.33>,{exit_status,0}}
> >    4> c(dreck).
> >    {ok,dreck}
> >    5> dreck:r().
> >    timeout
> >    6> dreck:r().
> >    {#Port<0.65>,{exit_status,0}}
> >    7> dreck:r().
> >    {#Port<0.66>,{exit_status,0}}
> >    8> dreck:r().
> >    {#Port<0.67>,{exit_status,0}}
> 
> maybe I should also point out that the exit status doesn't get
> delivered only after the first compile command in a node.
> 
> Another thing is: After the timeout, I have a /bin/true zombie in the
> process table which disappears after the next test run.
> 
>        Goodbyte, Gerd.
> -- 
> Gerd Flaig                     Technik                
> Bei Schlund + Partner AG       Brauerstraße 48      D-76135 Karlsruhe
>  Physics is like sex: sure, it may give some practical results,
>  but that's not why we do it. -- Richard Feynman

-- 
Shawn.

  Afternoon, n.:
  	That part of the day we spend worrying about how we wasted the morning.



More information about the erlang-questions mailing list