Subject: Re: FVWM: FvwmButtons sucking up CPU... (fwd)

From: "Randall S. Winchester" <[email-masked]>
Date: Tue, 3 Feb 1998 11:49:03 -0500 (EST)

Chuck and Steve,

I wanted to make sure you two incorporated this patch that was sent in by
"Grant McDorman <[email-masked] " in the code base. This fixes a very long
standing bug. We have a deamon, we wrote, that runs on our machines that
looks for and kills programs that stay running when the user logs out. 
FvwmButtons has always been one of the worst offenders.

Every time I look at the modules directory I am reminded how much of the
code could/should be moved to the library. DeadPipe() is just a small
example of what would be better suited as an API that one links against.

FYI,
Randall

I wrote the patch; the latest version is attached.

Other modules have the same problem; however, since they aren't used as much
the problem is not as visible.

According to Michael Tiefenback:
> On Fri, 30 Jan 1998, Jeff Wiegley wrote:
> 
> > [snip]
> > Well today Things were horrible and so I did top to see if accidentally
> > had some program I wrote churning out zombies or other detached processes
> > from my thesis program.  And what I found was I had seven instances of
> > FvwmButtons running and they were all fighting for 100%CPU attention.
> > 
> > I read the mailing list archives and noticed that others are having
> > similar problems but I couldn't find a fix for it.
> 
> My feeble memory tells me that I once suffered from this, too, in long-ago
> days (perhaps pre-version2), and that it was a (sometime later) fixed
> problem with FvwmButtons not noticing that its pipes to its parent were
> dead and gone.  The fix at the time was a few lines dealing with testing
> the read pipe returns, exiting on closure of the pipes. I haven't noticed
> it on my own office 2.0.46 setup, nor at home on the (2.0.43?) setup I'm
> running.  I hope this helps someone, although I don't see how this
> particular error could have crept back into the code. 
> 
> Michael Tiefenback
> 
> --
> Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to [email-masked].
> To report problems, send mail to [email-masked].

-- 

Grant McDorman <[email-masked]>
ISG Technologies, Inc.  http://www.isgtec.com
Mississauga, Ontario, Canada

---

From: "Charles Hines" <[email-masked]>
Date: Tue, 3 Feb 1998 12:21:36 -0500

>>>>> "rsw" == Randall S Winchester <[email-masked]> writes:

rsw> Chuck and Steve,

rsw> I wanted to make sure you two incorporated this patch that was
rsw> sent in by "Grant McDorman <[email-masked] " in the code
rsw> base. This fixes a very long standing bug. We have a deamon, we
rsw> wrote, that runs on our machines that looks for and kills
rsw> programs that stay running when the user logs out.  FvwmButtons
rsw> has always been one of the worst offenders.

I've already incorporated a version of this patch into my development
version, so it will be in 2.0.47, never fear.  I did do it slightly
differently though (basically just made every DeadPipe just exit).

rsw> Every time I look at the modules directory I am reminded how much
rsw> of the code could/should be moved to the library. DeadPipe() is
rsw> just a small example of what would be better suited as an API
rsw> that one links against.

Actually, for most of them a SIGPIPE handler probably isn't even
needed since the default action for a SIGPIPE is to just call _exit()
anyways.  Perhaps I'll go through and remove all of the ones that are
truly unnecessary.

But yes, there is a lot of other module code that could be moved to
the library or into it's own module-common library, and I keep that in
mind (it's been on the TO-DO list for quite some time, but it's not as
vital as other things just yet).

Chuck
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].