[GRASS5] Volunteer wanted for CELL driver color problem

Markus Neteler neteler at geog.uni-hannover.de
Thu Apr 19 06:33:24 EDT 2001


On Wed, Apr 18, 2001 at 10:34:30PM +0100, Glynn Clements wrote:
> 
> Andreas Lange wrote:
> 
> > i watched this strange behaviour with my last cygwin/Windows build of
> > the pre-stable code. IMHO it is not the "start" parameter, but d.mon
> > start=CELL works once, but no longer after the CELL driver is stopped
> > with d.mon stop=CELL. 
> > I can restart the CELL driver only if i remove the
> > $LOCATION/.tmp/$hostname/CELL socket file. I think for some reason the
> > file/socket is not removed. 
> 
> Compare the code in src/display/devices/lib/SWITCHER.c:
> 
>     if (G_sock_exists(sockpath) && 
> 	(listenfd = G_sock_connect(sockpath)) != -1)
>     {
> 	close (listenfd);
> 	G_fatal_error ("Monitor <%s> is already running", me);
>     }
> 
> to that in src/display/devices/XDRIVER/XDRIVER24/SWITCHER.c:
> 
>     if (G_sock_exists(sockpath))
>     {
>         if ((listenfd = G_sock_connect(sockpath)) != -1)
>         {
> 	    close (listenfd);
> 	    fprintf (stderr, "Monitor <%s> is already running\n", me);
>             exit (EXIT_FAILURE);
>         }
>         if (unlink (sockpath) != 0)
>         {
>             fprintf (stderr, "Failed to remove stale socket file:\n"\
>                     "\t%s\n", sockpath);
>             exit (EXIT_FAILURE);
>         }
>     }
> 
> Someone thought to remove the socket if it exists but is unused; but
> only for the XDRIVER case.
> 
> I've been looking through some of the files in src/display/devices
> today, and it's clear that the whole thing needs a spring clean. A lot
> of code is (more or less) duplicated when it ought to be shared, and
> changes only seem to get put into one or other of the different
> versions.
> 
> Rather than just copying the fixes around between the versions, I'm
> going to start moving common code out of the individual drivers and
> back into src/display/devices/lib where it belongs.

Thanks for your offer, Glynn,

it will be great to use your cleaned code. Probably all our problems
disappear then.

Markus

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list