ID:1960002
 
BYOND Version:508
Operating System:Windows Server 2012 rc2
Web Browser:Chrome 46.0.2490.64
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
Calling shell() returns "true" if spawn was used at any point in the call tree, breaking my shit because it one: expects a number or null as the return from shell(), and two: needs to know the exit code of the shell() command.

So here is the code path:
MasterController/Process() (runs all the periodic stuff)
Ticker/Process(), (handles game mode stuff, runs every two seconds)
Ticker/checkmaprotate()
global/maprotate()
global/changemap(maptochangeto)
shell("../bin/changemap.bat")

So, because this requires recompiling the game, something that could take 30 to 60 seconds to do, I decided to add a spawn between checkmaprotate and maprotate, other wise this was locking up the entire mastercontroller. This is the new code path:


MasterController/Process() (runs all the periodic stuff)
Ticker/Process(), (handles game mode stuff, runs every two seconds)
Ticker/checkmaprotate()
spawn(-1)
global/maprotate()
global/changemap(maptochangeto)
shell("../bin/changemap.bat")

This broke everything. shell returns "true" immediately, Because the error code isn't a number or null, it assumes its an error and triggers an alert, Because it doesn't get a 0 as a confirmation it doesn't tell the players about the new map. because it no longer blocks at the shell proc there is no way to ensure the round doesn't end and restart while the compiling is happening, breaking the server.

So now i'm stuck between two equally shitty options, lock up the internal ticker processes (including things like atmos and mob heal/damage/stun updates) while the compile happens or have the map rotation system be unable to see the return code and catch errors or even know when it is done.

*sigh*

Edit:

Ok, so now it seems to not be doing it, I'll update when I have more info.