[GRASS-dev] Re: testing native winGRASS

Moritz Lennert mlennert at club.worldonline.be
Fri Mar 16 18:11:46 EDT 2007


On Fri, March 16, 2007 23:07, Moritz Lennert wrote:
> On Wed, March 14, 2007 18:47, Glynn Clements wrote:
>>
>> Moritz Lennert wrote:
>>
>>> Paul Kelly wrote:
>>> > but at the minute my mind has gone blank as to the portable way to
>>> > replace that. I general audit of calls to system() would have caught
>>> > that if we're able to get round to doing it I suppose.
>>>
>>> This might be priority to my testing via the GDF GRASS Tutorial, so
>>> I'll
>>> try to do that first.
>>>
>>> Should all system calls be replaced by G_system ? Should any system /
>>> G_sytem calls be avoided ? Or should we check which system() calls use
>>> functions which might not exist in Windows ?
>>
>> Avoid system() and G_system() equally. G_system() is almost identical
>> to system(), except that it appears to work around a signal handling
>> bug in some ancient system() implementations. Ditto for G_popen().
>
> I've done a first "audit" of system() and G_system() calls. The result is
> attached.


I forgot: Just in case it is useful here's the command line I used for
this "audit":

grep -nRI "system \?( \?" * | grep -v debian | grep -v dist | grep -v
"\.py" | grep -v "description\.html" | grep -v "gislib\.dox" | grep -v "*"
| sort | uniq > systemcalls.txt
(plus some manual editing)

Moritz




More information about the grass-dev mailing list