You are not logged in.
Meddl guys,
I have a low IQ in systemd, and i'm curious if there is an easy/clean way to achieve the following:
For tasks like compiling or performing actions on code repositories, only one process may be running at the same time.
If there are (by intention or not), for example, two IDE's running, such actions have to be synchronized in a way that if there's a running process (make..), any subsequent call should be delayed until completion.
However, if there are multiple invokers waiting for the same task, both should queued up for the next run. When the next process can be started, all queued invokes should receive the (duplicated) output of that process until it
terminates again.
I thought of writing a small C program that is activated by systemd's (unix-)socket activation, calls make etc. and forwards make's output to all processes that had connected before make was started.
Is there some clean way to achieve this functionality without writing C code, either with pure systemd units or with an other tool?
Thanks in advance
Offline