moved function delarations that belong to g_spawn to g_spawn.h