site  contact  subhomenews

Continuing improving pup_event

February 20, 2018 — BarryK

I reported on this a couple of days ago:

http://bkhome.org/news/201802/revisiting-pupevent-first-changes.html

The woof-CE developers are also overhauling pup_event. I noticed that they have removed the IPC mechanism, and the one-second probing for optical media.

When X starts, /usr/local/pup_event/pup_event_frontend_d is started (from /root/.xinitrc) as a background process. In Puppy and Quirky/Easy, this "daemon" calls /usr/local/pup_event/frontend_timeout every second, that script, every fourth second, probes if an optical media inserted.

/usr/local/pup_event/pup_event_frontend_d reads hotplug events, known as "uevents", from the kernel, and this includes optical media insert/remove. However, the kernel hotplugging detection does not work for optical on some old PCs. Hence the backup probing in /usr/local/pup_event/frontend_timeout

However, the frequent optical drive probes impact performance, and the woof-CE developers decided to remove that from /usr/local/pup_event/frontend_timeout. Me too, it is now gone.

In fact, I now only have /usr/local/pup_event/frontend_timeout60, that runs every 60 seconds. It now works by the pup_event IPC mechanism. I have expanded usage of this IPC, which was my original intention.

/usr/local/pup_event/pup_event_frontend_d is a "server", that posts IPC messages about hotplug events, network up/down (and what interface), and 1, 4 and 60 second timeouts.

pup_event IPC is described in your puppy/Quirky/Easy, at /usr/local/pup_event/pup_event_ipc-README.htm

BaCon

Some of my utilities are written in BaCon, but the last few years I have been plagued with problems, the utilities not working properly.

I have been working with Peter over the last few days, trying to narrow-down the problems. It mostly comes down to "string handling improvements" that were introduced in BaCon 3.0.3+.

Discussion here:
http://basic-converter.proboards.com/thread/992/string-manipulation-causes-segmentation-fault
http://basic-converter.proboards.com/thread/988/implicit-declaration-poll-function
http://basic-converter.proboards.com/thread/989/string-variable-inside-usec
http://basic-converter.proboards.com/thread/990/concat-error

I have been rewriting pup_event_frontend_d and pup_event_ipc, works well now.

Tags: easy, quirky