On Sat, Dec 12, 2009 at 7:42 PM, Andrei Soroker <soroker@gmail.com> wrote:
Hello!

When yaws is started with a yaws.conf file that specifies some id =
..., yaws disregards that setting.

Here's why (I think):

With --id not specified, bin/yaws defaults to --id=default

yaws_sup:get_app_args/0 returns #env with #env.id set to default
(because it wasn't undefined).

In yaws_config:fload/7 the following guards fail because #gconf.id is
default, not "default":

["id", '=', String] when GC#gconf.id == undefined;
                               GC#gconf.id == "default" -> ...

And we get the "Ignoring 'id ..." message.

Right?

Correct. The default wants to be the string "default" but when the yaws shell script passes an id value of default in the env it's treated as an atom, not as a string, so the guard misses it.
 
Perhaps the correct solution is for bin/yaws to omit the default id
parameter.  Even if fload/7 is tweaked to look for 'default' instead
of "default" (and id from yaws.conf processed correctly), "ps -ax |
grep yaws" will still show a yaws system running with "id default",
which is misleading.

Agreed. I've made changes to this effect but I'd like to get Klacke to review them before I put them on github master.

thanks,
--steve