Show newer
Some of you loved our JUMBO MUG and were disappointed when it went out of stock and our supplier discontinued.
We found a replacement!
Proceeds support independent reporting causes like the Sharyl Attkisson ION Awards and the Brechner Center for FOI.
https://store.sharylattkisson.com

Are there any developers in the fediverse who upload their apps to @flathub ?

#linux #flathub #question

In the Linux world, there are many interprocess communication (IPC) methods available for system programmers. After some web searching, I found that there are rarely blogs or books that summarize them all. This article roughly lists them all with minimal explanation and some links to official manuals.

POSIX IPCs

POSIX-flavor IPCs include semaphores, shared memory, and message queues.

semaphore

There are also two subtypes of semaphores: named and unnamed. For details, see man 7 sem_overview.

sem_getvalue(3)sem_post(3)sem_wait(3)sem_trywait(3)sem_timedwait(3)sem_open(3) // namedsem_close(3) // namedsem_unlink(3) // namedsem_init(3) // unnamedsem_destroy(3) // unnamed


shared memory

POSIX shared memory (shm) IPC only has named version, the shm objects are stored in Linux tmpfs (by default /dev/shm).

shm_open (3)shm_unlink (3)


message queue

POSIX message queue (mq) IPC objects are also named, but they are stored in a special filesystem, mqueue. A mqueue filesystem can be mounted with the following command,

mount -t mqueue none /dev/mqueue


The libc APIs and their syscall counterparts are listed below, details see man 7 mq_overview.

Library interface System callmq_close(3) close(2)mq_getattr(3) mq_getsetattr(2)mq_notify(3) mq_notify(2)mq_open(3) mq_open(2)mq_receive(3) mq_timedreceive(2)mq_send(3) mq_timedsend(2)mq_setattr(3) mq_getsetattr(2)mq_timedreceive(3) mq_timedreceive(2)mq_timedsend(3) mq_timedsend(2)mq_unlink(3) mq_unlink(2)


SystemV / XSI IPCs

Similar to the POSIX IPCs, SystemV/XSI-flavor IPCs have the same three types IPCs under Linux: semaphore, shared memory, and message queue. For details, see man 7 sysvipc.

semaphore

semget(2) // Create a new set or obtain the ID of an existing set. This call returns an identifier that is used in the remaining APIs.semop(2) // Perform operations on the semaphores in a set.
semctl(2) // Perform various control operations on a set, including deletion.


shared memory

shmget(2) // Create a new segment or obtain the ID of an existing segment. This call returns an identifier that is used in the remaining APIs.
shmat(2) // Attach an existing shared memory object into the calling process's address space.
shmdt(2) // Detach a segment from the calling process's address space.
shmctl(2) // Perform various control operations on a segment, including deletion.


message queue

msgget(2) // Create a new message queue or obtain the ID of an existing message queue. This call returns an identifier that is used in the remaining APIs.
msgsnd(2) // Add a message to a queue.
msgrcv(2) // Remove a message from a queue.
msgctl(2) // Perform various control operations on a queue, including deletion.


UNIX IPCs

There are some IPCs widely implemented in UNIX-like OSs, but not specified in the POSIX standard. These include pipe, FIFO, signal, and unix domain socket.

Pipe & FIFO

The pipe IPC and FIFO are fundamentally the same, except that FIFO is named while pipe is not.

popen(3) // pipe
pclose(3) // pipe
mkfifo(3) // FIFO
mkfifoat(3) // FIFO


Signal

For details see man 7 signal.

signal(2)
sigaction(2)
kill(2)
sigprocmask(2)
sigpending(2)
sigsuspend(2)
// and more ...


Unix Domain Socket

Unix domain sockets (UDS) use the socket programming interface for local IPC. For details, see man 7 unix.

socket(AF_UNIX, ...) (2)


Modern Linux IPCs

Binder

The binder IPC was initially implemented for the Android OS and has been merged into Linux upstream.
For details, see The Android binderfs Filesystem — The Linux Kernel documentation.

DBus / kdbus

The DBus IPC is now widely used. It is implemented in userspace. Efforts are made towards a kernel version (kdbus), but it has not been merged upstream. For details, see dbus (www.freedesktop.org).

https://blog.jcix.top/2024-07-01/linux_ipc/

#Linux

The P Diddy human trafficking investigation is being covered up in real time by the same asshole who covered up the Epstein & Maxwell human/child trafficking and foreign espionage network - from the great Nick Bryant

https://nickbryantnyc.com/blog/f/four-words-connect-epstein-and-p-diddy

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Ignacio Ruiz Cejudo, Johan Sternerup, Rens Oliemans, Robert Burks, Sergei Golovin, and Toshihiro Umehara for assigning their copyright to the FSF! #GDB #Emacs #GNUAstro #GNUstep More: u.fsf.org/3ht #CopyrightAssignments

This article from Cory Doctorow reminds us that DRM isn't just oppressive (and defective) by design -- it carries serious risks to our freedom and privacy: u.fsf.org/3vg #DefectiveByDesign #EndDRM

FOSS audio software Pipewire has been updated to version 1.2. This update adds support for asynchronous processing, earlier and improved reporting of config parsing errors, support for making and using multiple data-loops, and more. The code is licensed using the MIT license.

The main project website is here:

pipewire.org/

The source code is available on Gitlab:

gitlab.freedesktop.org/pipewir

The release notes for this update is here:

gitlab.freedesktop.org/pipewir

The project has a presense on Mastodon:

fosstodon.org/@pipewire

If you want to help the project financially they accept donations through Liberapay:

liberapay.com/PipeWire

Physics based tank game "Toy Tanks" is now available on GOG. It was originally released back in 2022. It has a native Linux version and is now available DRM free.

gog.com/en/game/toy_tanks

This week's donation went to the Devuan project. It's a Linux distro based off Debian which not only doesn't use SystemD but during install gives the user a choice between SysVinit, Runnit, and OpenRC. If you use the netinstaller option you also get a choice of desktop environments during install including XFCE, Cinnamon, Gnome, KDE, LXDE, LXQT and Mate. It can also easily be used with the libre kernel if one wanted to if you follow the instructions at FSFLA. It uses the Ext file system by default. The latest release is called Daedalus which is based off Debian 12 but you can install Excalibur which is based off Debian testing if one needed newer packages. Overall it is a great option if one wants a distro giving them more freedom of choice during install.

The project's main website is here:

devuan.org/

The project has a forum here:

dev1galaxy.org/

The project accepts donations through Paypal, crypto and bank transfer if you wish to help financially:

devuan.org/os/donate.html

Show older
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.