[winGRASS] d.mon socket problem
Glynn Clements
glynn.clements at virgin.net
Thu May 22 15:57:38 EDT 2003
Markus Neteler wrote:
> > 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 ....
OK; maybe the problem is with Cygwin's fork(). Or with Cygwin's Xlib
not allowing for fork()ing.
In which case, try re-building mon.start with __W98__ defined (e.g.
add "EXTRA_CFLAGS = -D__W98__" to src/display/d.mon/pgms/Gmakefile).
In the longer term, we need to re-think the monitor startup. The
current mechanism (fork() and parent exit() once the socket is
listening) works well (except on Cygwin), but is highly Unix-specific.
One option would be a semaphore, lock or similar, but I don't know
what mechanisms Windows has in this area. The other alternative is to
silently poll until success or timeout.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-windows
mailing list