[GRASS-dev] [GRASS GIS] #3089: exec_command fails if '.exe' not included in filename.
GRASS GIS
trac at osgeo.org
Tue Jul 5 22:37:24 PDT 2016
#3089: exec_command fails if '.exe' not included in filename.
--------------------------+---------------------------------
Reporter: artegion | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Default | Version: svn-releasebranch72
Resolution: | Keywords:
CPU: Unspecified | Platform: MSWindows 7
--------------------------+---------------------------------
Comment (by glynn):
Replying to [ticket:3089 artegion]:
> It seems like os.execvpe does not use PATHEXT environment variable
(maybe because dot in filename overrides PATHEXT and ".category" is taken
as file extension)
In this specific case, I'd suggest just using run_command() instead of
exec_command(). On Windows, they amount to essentially the same thing
anyhow; Windows doesn't have a "real" execve(); it just executes the
command as a child process, waits for the child to terminate, then
exit()s.
There aren't many plausible situations where exec_command() is actually
needed; it mostly just provides a very slight efficiency gain (on Unix) by
not needing to keep the parent process alive for the duration of the
child.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3089#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list