[erlang-bugs] Arguments passed to escript's emulator by %%! affect os:cmd/1o

Hakan Mattsson hakan@REDACTED
Mon Aug 3 17:26:59 CEST 2009


Hi!

Thank you for reporting this bug.

It is now fixed and it will be released in R13B02.
Send me a mail if you want to test it earlier.

/Håkan
---
Håkan Mattsson (uabhams)
Erlang/OTP, Ericsson AB

On Tue, 21 Jul 2009, Sergey Samokhin wrote:

> Hello.
> 
> Some weeks ago I sent a bug report describing the problem with passing
> arguments to escript's emulator by using %%! and os:cmd/1. I used R13B
> to test it.
> 
> Today I've tested this with R13B01 - the problem is still here. I
> reproduced it on Archlinux and FreeBSD. So I decided to write this
> letter.
> 
> The easiest way reproduce the problem is by starting this script:
> 
> %-----------------------
> #!/usr/bin/env escript
> %%! -smp disable
> 
> main(_) ->
>     os:cmd("erl -detached -sname test").
> %-----------------------
> 
> Although there is no "-smp disable" within the argument to os:cmd/1,
> the newly started node will have smp disabled too.
> 
> It's impossible to use "%%! <arguments>" syntax (for example to make
> an escript's node hidden) because all arguments I specify are passed
> to a node started by os:cmd/1.
> 
> Here is the original bug-report with all the details on how to
> reproduce the bug:
> http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:1296:200905:finpkpaeoenpofkcegce
> 
> -- 
> Sergey Samokhin
> 
> ________________________________________________________________
> erlang-bugs mailing list. See http://www.erlang.org/faq.html
> erlang-bugs (at) erlang.org


More information about the erlang-bugs mailing list