<feed xmlns='http://www.w3.org/2005/Atom'>
<title>procd/service, branch master</title>
<subtitle>OpenWrt service / process manager</subtitle>
<id>https://git.openwrt.org/project/procd/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/procd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/'/>
<updated>2026-11-03T11:39:51Z</updated>
<entry>
<title>service: add workdir support for daemon instances</title>
<updated>2026-11-03T11:39:51Z</updated>
<author>
<name>Tianling Shen</name>
</author>
<published>2026-10-03T06:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=2e013572e8b3a33c61960f1e1c032dde52f5a78d'/>
<id>urn:sha1:2e013572e8b3a33c61960f1e1c032dde52f5a78d</id>
<content type='text'>
Allow instances to select a working directory with the workdir option.
Change directory after setting the process identity and fail startup
if the directory cannot be entered. Preserve the existing behavior
when workdir is omitted.

Pass the directory to ujail through a new -B option, reusing its
existing directory switch after jail setup. Track workdir changes,
include the value in instance dumps, and release owned strings.

For OCI bundle instances, process.cwd from the bundle takes precedence
over workdir because the bundle is parsed after the command-line options.

Signed-off-by: Tianling Shen &lt;cnsztl@immortalwrt.org&gt;
</content>
</entry>
<entry>
<title>service: drop the triggers of a deleted service at once</title>
<updated>2026-11-02T15:59:26Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-11-02T15:04:26Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=89452657dd247a7549733c81e6257d71cbd95031'/>
<id>urn:sha1:89452657dd247a7549733c81e6257d71cbd95031</id>
<content type='text'>
A deleted service keeps its triggers until its last instance has
exited, which can take up to the term timeout. A trigger firing in that
window runs the init script action, and a reload of a service that is
being deleted starts it again: dnsmasq stopped right before an ifdown
comes back on the interface event.

Remove the triggers when the service is deleted. A service set again
before its instances are gone gets the triggers of that request.

Fixes: 961dc692aff7 ("procd: stop service using SIGKILL if SIGTERM failed to do so")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>instance: log the watchdog timeout instead of the mode</title>
<updated>2026-10-25T08:43:55Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-10-25T08:43:55Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=1e0534b6c0119767db1a3084387be12cccd25f7a'/>
<id>urn:sha1:1e0534b6c0119767db1a3084387be12cccd25f7a</id>
<content type='text'>
The debug message for the watchdog timeout prints vals[0], which holds
the watchdog mode, so the log shows the mode as the timeout.

Print the timeout value.

Fixes: b2230e4ff28b ("procd: add service instance watchdog")
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>instance: update valid flag when moving instance config</title>
<updated>2026-10-25T08:43:34Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-04T19:56:32Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=1bf7709790bafeea92856f17dbc4dcacd0533274'/>
<id>urn:sha1:1bf7709790bafeea92856f17dbc4dcacd0533274</id>
<content type='text'>
instance_config_move() copies the newly parsed configuration into the
existing instance but leaves the valid flag untouched; it is only ever
set in instance_init(). An instance that failed validation once stays
invalid forever, so fixing the service configuration and reloading has
no effect until the service is deleted and re-added. Conversely an
update to an invalid configuration is still treated as valid.

Propagate the valid flag together with the rest of the configuration.
Stop a running instance when its new configuration is invalid, also
when no compared field changed or a reload signal is set. Otherwise
the process keeps running while instance_dump() hides it.

Fixes: 14447cd46a3c ("add more parsing code")
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>instance: don't leak stdio pipes in instance_start error paths</title>
<updated>2026-10-25T08:43:12Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-04T19:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=faa5fc05fcfdd2252f95302733d70b480e7341d3'/>
<id>urn:sha1:faa5fc05fcfdd2252f95302733d70b480e7341d3</id>
<content type='text'>
instance_start() creates the stdout/stderr pipes before it checks the
valid flag, and a failing fork() also returns with both pipes open. Each
occurrence leaks up to four file descriptors in procd.

Check the valid flag before the pipes are created and close the pipe
ends when fork() fails. An invalid instance still gets its respawn
timer cancelled and its restart state cleared, as before.

Fixes: 9851e517f1c3 ("procd: support relayoing daemon stdout/stderr to syslog")
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>instance: skip non-string entries of the watchdog attribute</title>
<updated>2026-10-25T08:42:58Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-10-25T08:42:58Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=a68677a6cc64b365f20b0a4c6322db4b1059ef5a'/>
<id>urn:sha1:a68677a6cc64b365f20b0a4c6322db4b1059ef5a</id>
<content type='text'>
The watchdog array is parsed with blobmsg_get_string() and atoi() on
each entry without a type check, like the respawn array. A non-string
entry passes its binary payload to atoi(), which reads it as an
unterminated string.

Skip an entry that is not a string.

Fixes: b2230e4ff28b ("procd: add service instance watchdog")
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>instance: skip non-string entries of the respawn attribute</title>
<updated>2026-10-25T08:42:51Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-04T19:55:51Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=2630deeb4750645cf8004ddfb5385c347286f86f'/>
<id>urn:sha1:2630deeb4750645cf8004ddfb5385c347286f86f</id>
<content type='text'>
The respawn array is parsed with blobmsg_get_string() and atoi() on each
entry without a type check. A non-string entry passes its binary payload
to atoi(), which reads it as an unterminated string.

Skip an entry that is not a string.

Fixes: 98218b6aa897 ("add code to configure respawn via ubus")
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>instance: share the cgroup helpers</title>
<updated>2026-10-18T13:36:08Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-18T13:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=10d34ac23961771c8bf8fa612991a0008dd373d3'/>
<id>urn:sha1:10d34ac23961771c8bf8fa612991a0008dd373d3</id>
<content type='text'>
Placing the calling process into a cgroup, killing every process in a
cgroup and reading whether it is still populated live in instance.c
and work on the services tree only, yet the processes procd starts
from inittab need the same operations. Move them to utils/cgroup.c as
cgroup_join(), cgroup_kill() and cgroup_populated(), taking the path
of the cgroup, together with the drain timeout, and let the instance
code build its paths and call them. No functional change.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>service: clean up descendant processes for non-jail instances</title>
<updated>2026-10-18T13:27:22Z</updated>
<author>
<name>Tianling Shen</name>
</author>
<published>2026-10-15T03:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=39b5aac8c1b753f8e858eea3633a198466fd94da'/>
<id>urn:sha1:39b5aac8c1b753f8e858eea3633a198466fd94da</id>
<content type='text'>
Non-jail instances only kill remaining cgroup members when freed.
A respawn can therefore leave descendants from the previous run alive,
and stopping an instance can try to remove its cgroup before those
processes have exited.

Use the existing cgroup cleanup path for all started instances. Kill
remaining members when the main process exits, wait for the cgroup to
drain, and then remove its directory before completing teardown or
scheduling another run. Also kill the cgroup on a stop timeout.

Keep the existing one-second drain timeout and allow teardown or
respawn to proceed if descendants remain after it expires.

Signed-off-by: Tianling Shen &lt;cnsztl@immortalwrt.org&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>instance: fix instance dump</title>
<updated>2026-10-18T13:10:24Z</updated>
<author>
<name>AlexeyAndKartashov</name>
</author>
<published>2026-04-17T05:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=8ffead57f59583e72a0eb244b590908318f76dce'/>
<id>urn:sha1:8ffead57f59583e72a0eb244b590908318f76dce</id>
<content type='text'>
Move the `mount` and `setns` from instance data into the `jail` object

Signed-off-by: AlexeyAndKartashov &lt;alexey.and.kartashov@gmail.com&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
