Subject: Re:FvwmCommandS doesn't work on the latest linux kernels!!!!!

From: Dominik Vogt <[email-masked]>
Date: Fri, 12 Feb 1999 00:01:43 +0100

On Sun, Feb 07, 1999 at 04:50:24PM +0000, Adam L Rice wrote:
> Quoting [email-masked] ([email-masked]):
> > Find the line in FvwmCommandS.c
> >   SendText(Fd,"",0); /* tell fvwm that we are here */
> > 
> > Change it to the below by adding a space.
> >   SendText(Fd," ",0); /* tell fvwm that we are here */
> > 
> > That should do.
> 
> Aaah yes, I see the problem, it's a bug in SendText which will (under some
> circumstances) do a zero-byte system write. The behaviour of such a call is
> undefined, and could cause the pipe to be closed.
> 
> The following (untested) patch, applied to libs/Module.c, should address the
> problem, but it would be better if SendText used some sort of buffering, or
> writev instead of write.
> 
> --- Module.c~	Fri Jan  8 21:23:16 1999
> +++ Module.c	Sun Feb  7 16:45:13 1999
> @@ -84,7 +84,8 @@
>  
>      w=strlen(message);
>      write(fd[0],&w,sizeof(int));
> -    write(fd[0],message,w);
> +    if (w)
> +       write(fd[0],message,w);
>  
>      /* keep going */
>      w = 1;

I see that we didn't apply this one. Since it seems perfectly
safe I'll commit it.

Bye

Dominik

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].