[GRASS-dev] Re: [GRASS GIS] #928: 6.4: all shell scripts broken from command line + tcl; wx addon scripts broken

GRASS GIS trac at osgeo.org
Thu Feb 18 04:16:59 EST 2010


#928: 6.4: all shell scripts broken from command line + tcl; wx addon scripts
broken
----------------------+-----------------------------------------------------
  Reporter:  hamish   |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect   |      Status:  new                      
  Priority:  blocker  |   Milestone:  6.4.0                    
 Component:  default  |     Version:  svn-releasebranch64      
Resolution:           |    Keywords:  addons                   
  Platform:  Linux    |         Cpu:  x86-64                   
----------------------+-----------------------------------------------------
Comment (by glynn):

 Replying to [comment:1 hamish]:

 > I guess it has to do with this, but unless popen() has different quoting
 needs I don't see the difference:
 >
 > r40849 (relbr64) `Replace G_popen() with popen() (backport from devbr6,
 r40834)`
 >
 >
 > does this need to be backported to 6.x?:
 >
 > r40904 (trunk)   `G_spawn_ex() expects descriptors as "int"s, not
 "char*".`

 It can't be; the code which it fixes doesn't exist in 6.4 (and isn't
 actually used in 6.5, and probably shouldn't have been back-ported).

 But that's not the problem here. The problem is r40716, which back-ports
 r40713. This was fixed in 6.5 with r40724, which also needs to be back-
 ported.

 The various "popen"-related issues which appear to be getting conflated
 are:

 1. The [G_]popen() of $GRASS_WISH for the parameter dialogs. Originally,
 $GRASS_WISH wasn't quoted, which may create problems on Windows if it's
 somewhere within `$ProgramFiles`. So r40713 quotes it, but I screwed up
 (the Unix version used single quotes instead of double quotes, and wasn't
 tested). This was fixed in r40724. It isn't applicable to 7.0, as
 GRASS_GUI=tcltk isn't supported there.

 2. Eliminating (the old) G_popen() in favour of popen(). G_popen() just
 mimics popen() on Unix and doesn't work on Windows (which actually
 provides a Unix-style popen()).

 3. In 7.0, G_popen() is implemented on top of G_spawn_ex() and has a
 completely different interface: it accepts an argument list (char**)
 rather than a string to be interpreted by the shell. Currently, it's only
 used by G_pager() (interface to $GRASS_PAGER) and the code which emails
 error messages to the user. In 6.x, it isn't used at all; with popen()
 being eliminated, lib/gis/popen.c can (and should) be removed.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/928#comment:2>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list