Bad argument when open_port with spawn_executable

View: New views
3 Messages — Rating Filter:   Alert me  

Bad argument when open_port with spawn_executable

by Hynek Vychodil :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
according to documentation I'm trying use spawn_executable argument to
open_port/2. It seems there is a bug or I missed something?

13> open_port({spawn_executable, os:find_executable("perl")}, []).
** exception error: bad argument
     in function  open_port/2
        called as open_port({spawn_executable,"/usr/bin/perl"},[])

I obtain same result for wide variety of PortSettings which seems not
affecting it.

Best regards

--
--Hynek (Pichi) Vychodil

Analyze your data in minutes. Share your insights instantly. Thrill your
boss.  Be a data hero!
Try Good Data now for free: www.gooddata.com

Re: Bad argument when open_port with spawn_executable

by Kenneth Lundin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The spawn_executable variant of erlang:open_port was introduced in R13B01.
The error you get indicates that you are running on an older version
of Erlang/OTP.
The bad argument refers to {spawn_exectable,_} which is not supported
before R13B01.

/Kenneth Erlang/OTP, Ericsson

On Mon, Jul 6, 2009 at 12:48 PM, Hynek Vychodil<vychodil.hynek@...> wrote:

> Hello,
> according to documentation I'm trying use spawn_executable argument to
> open_port/2. It seems there is a bug or I missed something?
>
> 13> open_port({spawn_executable, os:find_executable("perl")}, []).
> ** exception error: bad argument
>     in function  open_port/2
>        called as open_port({spawn_executable,"/usr/bin/perl"},[])
>
> I obtain same result for wide variety of PortSettings which seems not
> affecting it.
>
> Best regards
>
> --
> --Hynek (Pichi) Vychodil
>
> Analyze your data in minutes. Share your insights instantly. Thrill your
> boss.  Be a data hero!
> Try Good Data now for free: www.gooddata.com
>

________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org


Re: Bad argument when open_port with spawn_executable

by Hynek Vychodil :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, it is reason: Erlang R13B (erts-5.7.1)

I did not checked mine local documentation and did not suspect change in
minor release.

Sorry for inconvenience.

On Mon, Jul 6, 2009 at 1:25 PM, Kenneth Lundin <kenneth.lundin@...>wrote:

> The spawn_executable variant of erlang:open_port was introduced in R13B01.
> The error you get indicates that you are running on an older version
> of Erlang/OTP.
> The bad argument refers to {spawn_exectable,_} which is not supported
> before R13B01.
>
> /Kenneth Erlang/OTP, Ericsson
>
> On Mon, Jul 6, 2009 at 12:48 PM, Hynek Vychodil<vychodil.hynek@...>
> wrote:
> > Hello,
> > according to documentation I'm trying use spawn_executable argument to
> > open_port/2. It seems there is a bug or I missed something?
> >
> > 13> open_port({spawn_executable, os:find_executable("perl")}, []).
> > ** exception error: bad argument
> >     in function  open_port/2
> >        called as open_port({spawn_executable,"/usr/bin/perl"},[])
> >
> > I obtain same result for wide variety of PortSettings which seems not
> > affecting it.
> >
> > Best regards
> >
> > --
> > --Hynek (Pichi) Vychodil
> >
> > Analyze your data in minutes. Share your insights instantly. Thrill your
> > boss.  Be a data hero!
> > Try Good Data now for free: www.gooddata.com
> >
>



--
--Hynek (Pichi) Vychodil

Analyze your data in minutes. Share your insights instantly. Thrill your
boss.  Be a data hero!
Try Good Data now for free: www.gooddata.com