Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] early ruleset specification check
Home

[Freeciv-Dev] early ruleset specification check

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] early ruleset specification check
From: Reinier Post <rp@xxxxxxxxxx>
Date: Fri, 10 Aug 2001 23:11:45 +0200

Many Freeciv players are liable to type:

  /set techs 0

and baffled to see the server crash upon /start.  (You can see this
from the fact that they keep trying.) civserver.freeciv.org sees
this happen with some regularity.

The real remedy is to actually load every ruleset as soon as it is parsed,
reporting an error on failure.  However, the parsing code contains some 50
exit(1) calls, which I'm not going to remove, and a fork() just to protect
ruleset loading would be overkill.

The attached patch only tries to verify that ruleset files are readable
at the time they are specified with a /set command; if they are readable
but incorrect, the server will still abort on /start.

As a side effect, a warning has been shifted from one function to another,
which will make $FREECIV_pATH dependend file loading slightly more verbose.

-- 
Reinier

Attachment: 1.11.12+rulesetcrash.diff-Nurd
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] early ruleset specification check, Reinier Post <=