[GRASS-SVN] r40651 - grass/branches/develbranch_6/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 25 20:09:08 EST 2010
Author: neteler
Date: 2010-01-25 20:09:07 -0500 (Mon, 25 Jan 2010)
New Revision: 40651
Modified:
grass/branches/develbranch_6/lib/gis/spawn.c
Log:
glynn: return the exit code (intentionally partial backport of r40647)
Modified: grass/branches/develbranch_6/lib/gis/spawn.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/spawn.c 2010-01-26 01:08:55 UTC (rev 40650)
+++ grass/branches/develbranch_6/lib/gis/spawn.c 2010-01-26 01:09:07 UTC (rev 40651)
@@ -685,6 +685,14 @@
if (n != pid)
status = -1;
+ else {
+ if (WIFEXITED(status))
+ status = WEXITSTATUS(status);
+ else if (WIFSIGNALED(status))
+ status = WTERMSIG(status);
+ else
+ status = -0x100;
+ }
}
undo_signals(sp->signals, sp->num_signals, SST_POST);
More information about the grass-commit
mailing list