[erlang-questions] Can werl be detached?
Daniel Goertzen
daniel.goertzen@REDACTED
Wed May 25 22:30:26 CEST 2016
I have a windows app (also on R15) and this is the shortcut that launches
it:
Target: "C:\Program Files (x86)\myprogram\erlang\erts\bin\werl.exe"
-detached -smp enable -run bootstrap"
Start in: "C:\Program Files (x86)\myprogram\erlang\erts\bin"
So, try changing the current directory first to erts/bin before running
detached.
On Tue, May 17, 2016 at 6:47 PM John R. Ashmun <john.ashmun@REDACTED>
wrote:
> Perhaps my subject is not quite the correct question. Here's my context:
>
> I'm beginning to recreate in Erlang on Microsoft Windows 10 a public
> domain program I used to enjoy on my Commodore Amiga: mATC was a game in
> which the user acted as a military Air Traffic Controller. I am using a wx
> window to draw the player's map with aircraft data blocks overlaid. I
> don't have a use for the initial window that opens when werl is started.
>
> http://erlang.org/doc/man/werl.html
>
> says, in part, "All flags except -oldshell work as they do for the erl
> <http://erlang.org/doc/man/erl.html> command." I don't have a UNIX-y
> system available to me to learn how they work for the erl command. (The
> erl command as an interactive program is iffy in a Windows Command Prompt
> window.)
>
> In particular, the description of -detached in
>
> http://erlang.org/doc/man/erl.html
>
> would seem to be what I want:
>
> "Starts the Erlang runtime system detached from the system console. Useful
> for running daemons and backgrounds processes. Implies -noinput."
>
> I want the Erlang VM to run my game without an Erlang shell's having
> opened a window, and I want my game to be in control of its wx window.
>
> Further, following what I think I learned from "Erlang and OTP in Action",
> I have an OTP application being started by a boot file created from a .rel
> file. All of this is in the setting of an ancient Erlang release: R15B.
>
> If I use this Command Prompt batch file, mATC.bat:
>
> werl -pa ebin -pa mATC_app\ebin -detached -boot mATC -config sys
>
> a Windows error message window appears that says:
>
> "Failed to execute C:\Program Files\erl5.9\erts5.9\bin\beam.smp.dll
> The system cannot find the file specified."
>
> The DLL is actually present at that location, and of course everything
> runs well when I don't use -detached.
>
> Please advise.
>
> Regards,
> John Ashmun
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160525/b8f92659/attachment.htm>
More information about the erlang-questions
mailing list