[winGRASS] d.mon socket problem

Markus Neteler neteler at itc.it
Thu May 22 05:10:18 EDT 2003


On Wed, May 21, 2003 at 05:20:10AM +0100, Glynn Clements wrote:
[...]
> As for the startup message:
> 
> > GRASS >d.mon x0
> > Socket is already in use or not accepting connections.
> > Use d.mon to select a monitor
> > Problem selecting x0. Will try once more
> 
> This indicates that either:
> 
> a) you're using the "generic" version of mon.start, or

I had this problem with GRASS 5.0 winGRASS/Xserver as compiled by
Mike Thomas (on Win2000). The same was reported by my colleague using
winGRASS generic (on Win XP).

Two days ago I:
- installed Cygwin from scratch
- compiled GRASS 5.1 from sources with (after compiling PROJ4 separately):

GRASS50="/home/neteler/grass50cvs"
CFLAGS="-O2 -D__W98__" LDFLAGS="-s -I/usr/local/include -L/usr/local/lib"
./configure --prefix=/usr/local/grass51 \
    --with-grass50=$GRASS50 \
    --with-includes=/usr/X11R6/include \
    --with-postgres=yes \
    --with-postgres-includes=/usr/include/postgresql/internal \
    --with-postgres-libs=/lib \
    --with-tcltk=yes --with-gdal=yes --with-opengl=yes --with-odbc=no \
    --with-blas=no --with-lapack=no --with-fftw=no \
    --with-freetype=no --with-motif=no --with-gd=no --with-gdal=no \
    --with-png=no

(without --with-includes=/usr/X11R6/include it refused to compile)

Maybe I am missing something, but compilation went well (except the
makefile problem of r.mapcalc related to the 5.1 Makefile system).

> b) Cygwin's process management functions are badly broken.
> 
> The normal (i.e. Unix) mon.start uses execl() to start the driver, so
> the system() call in d.mon won't return until the driver fork()s, and
> this doesn't happen until after listen() has been called on the
> socket, so the subsequent mon.select is bound to succeed (unless the
> driver dies outright).
> 
> The "generic" mon.start (i.e. if --enable-w11 was used) uses spawnl()

... not using --enable-w11 ....

> to start the driver in the background (and passes "-" as argv[2], so
> the driver doesn't fork()). spawnl() returns immediately, so the first
> time that mon.select is run, the driver probably won't have finished
> initialising, so you get the above messages.
> 
> If you use the "generic" mon.start with the "real" X11 XDRIVER, you

.. yes, using "real" X11 XDRIVER ...

> will get the warning due to the first mon.select attempt failing, but

I see.
> it should work otherwise (unless the second attempt also fails; note
> that there isn't an explicit delay, so this is quite possible).

Without the "d.mon select" command it refuses to work.

> Given that your symptoms match option a) above, and you imply that you
> have both versions of XDRIVER, I'm tempted to suspect that you're
> switching between XDRIVER versions without also switching mon.start.

I have searched the entire machine, only libw11 is there but no libG11.
So I assume to have a pure "real" X11 XDRIVER installation.

Markus



More information about the grass-windows mailing list