No subject

Net.Noise owner news at
Fri Mar 26 01:46:54 EST 1993

Newsgroups: info.grass.programmer
From: shapiro at (Michael Shapiro)
Subject: Re: popen
Message-ID: <C4HHI3.Lw8 at>
Sender: news at (Net.Noise owner)
Organization: US Army Corps of Engineers Construction Engineering Research Labs
References: <01GW74LL9K6Q8Y5ZX0 at>
Date: Fri, 26 Mar 1993 06:46:50 GMT
Lines: 30

In <01GW74LL9K6Q8Y5ZX0 at> DOTSON at writes:

>I have been having a good deal of success compiling GRASS 4.0 under
>Linux.  I did come across a problem that someone
>may be able to solve quickly before I tear into the code.
>A function "popen" is defined in ....../libes/gis.  This function is
>also part of the standard gcc library and since it is written
>in ANSII C came up as an error because of incompatable types.  What is
>the purpose of a custon "popen"?  Does it duplicate existing 
>functionallity of the "built-in" version?  

>I renamed the GRASS defined version "p_open" so that I counld continue
>the build.  Does every reference to "popen" refer to the GRASS defined
>version or do some refer to the built-in version?

>Doug Dotson
>dotson at

In early version of GRASS we had problem with the system supplied popen()
trying to have two popens() at the same time. So I rewrote it and
put it in the gis library. We have renamed it G_popen() in 4.1.
I think the system popen() has been long since fixed since then so 
we/you could probably eliminate the popen() from the library and
things will work. But your solution effectively does this.

Michael Shapiro U.S. Army CERL
Environmental Division       

More information about the grass-dev mailing list