[erlang-questions] starting a window process from erlang

eigenfunction emeka_1978@REDACTED
Mon Jan 9 14:26:49 CET 2012


Hi everybody,
i have an application that looks basically like this:

init([]) -> ....,
             erlang:open_port({spawn,"cmd /c start www.google.com"},[exit_status]),
            {ok,#state{}}.


Here is the thing:

A) I start the erlang shell and i start my application:
    $ erl
         1> application:start(my_app).
          ==> it can start the external process (it opens up the
webbrowser)
          ==> behaves as expected

B) I start the application from the command line:
    $ erl -my_app
       ==> works normally but does not start the external process (it
does not open the webbrowser)
       ==> does not behave as expected

Am i missing something?



More information about the erlang-questions mailing list