[GRASS5] Libgrass_gis on Mingw - open.c patch

Glynn Clements glynn at gclements.plus.com
Sat May 21 18:23:24 EDT 2005


Markus Neteler wrote:

> > > I'll send the build errors as soon I get my work organized. I've started
> > > with some real testing and recompilation. The current module undergoing this
> > > test is r.average, which is presenting some problems because of system calls
> > > to r.stats and r.recode.
> > 
> > Does the Windows runtime not support system(), or is r.average using
> > Unix-specific features?
> 
> A question:
> Is it wrong to use G_system() within r.average instead of system()?

On Unix, G_system() appears to be almost identical to system(), except
that signal handling in the child is slightly different.

system() ignores SIGINT and SIGQUIT in the parent but leaves them
unchanged in the child, while G_system() ignores them in the parent
but restores them to SIG_DFL in the child.

This only makes a difference if the program has changed the way that
those signals are handled from the default behaviour.

So, using G_system() shouldn't affect anything on Unix. I have no idea
whether it will make matters better or worse on Windows.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list