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

From: Adam L Rice <wysiwyg_at_glympton.airtime.co.uk>
Date: Sun, 7 Feb 1999 16:50:24 +0000

Quoting isogai_at_ucsub.colorado.edu (isogai_at_ucsub.colorado.edu):
> 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
_at_@ -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;

-- 
Adam Rice -- wysiwyg_at_glympton.airtime.co.uk -- Blackburn, Lancashire, England
--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Sun Feb 07 1999 - 12:14:10 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST