<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://criu.org/index.php?action=history&amp;feed=atom&amp;title=Pidfd_store</id>
	<title>Pidfd store - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://criu.org/index.php?action=history&amp;feed=atom&amp;title=Pidfd_store"/>
	<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Pidfd_store&amp;action=history"/>
	<updated>2026-05-13T22:23:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.6</generator>
	<entry>
		<id>https://criu.org/index.php?title=Pidfd_store&amp;diff=5159&amp;oldid=prev</id>
		<title>Zeyady98: Created page with &quot;Pidfd store increases the reliability of pid reuse detection during pre-dumps/dumps using task pidfd instead of task creation time.  It is only supported for RPC and the C lib...&quot;</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=Pidfd_store&amp;diff=5159&amp;oldid=prev"/>
		<updated>2021-06-24T10:41:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Pidfd store increases the reliability of pid reuse detection during pre-dumps/dumps using task pidfd instead of task creation time.  It is only supported for RPC and the C lib...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Pidfd store increases the reliability of pid reuse detection during pre-dumps/dumps using task pidfd instead of task creation time.&lt;br /&gt;
&lt;br /&gt;
It is only supported for RPC and the C library.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
A connectionless unix socket is passed to CRIU during each pre-dump/dump through&lt;br /&gt;
the RPC option &amp;lt;code&amp;gt;pidfd_store_sk&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;criu_set_pidfd_store_sk&amp;lt;/code&amp;gt; routine in the the library.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE&amp;lt;/b&amp;gt;: This is targeted at migration tools like P.Haul, because the passed socket must be kept alive throughout all pre-dump/dump iterations.&lt;br /&gt;
&lt;br /&gt;
== Feature check ==&lt;br /&gt;
&lt;br /&gt;
This feature requires &amp;lt;code&amp;gt;pidfd_open&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;pidfd_getfd&amp;lt;/code&amp;gt; syscalls.&lt;br /&gt;
Support could be checked with:&lt;br /&gt;
: CLI: &amp;lt;code&amp;gt;criu check --feature pidfd_store&amp;lt;/code&amp;gt;.&lt;br /&gt;
: RPC: &amp;lt;code&amp;gt;CRIU_REQ_TYPE__FEATURE_CHECK&amp;lt;/code&amp;gt; and set &amp;lt;code&amp;gt;pidfd_store&amp;lt;/code&amp;gt; to true in the &amp;quot;features&amp;quot; field of the request&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;pidfd_store_sk&amp;lt;/code&amp;gt; is used as a queue for task pidfds. CRIU sends tasks pidfds to this socket and receives them in the next pre-dump/dump iteration. Those pidfds could then be used to check whether the task is still alive, otherwise it is a case of pid reuse and CRIU should make a full page dump.&lt;br /&gt;
&lt;br /&gt;
[[Category:P.Haul]]&lt;br /&gt;
[[Category:Under the hood]]&lt;br /&gt;
[[Category:API]]&lt;/div&gt;</summary>
		<author><name>Zeyady98</name></author>
	</entry>
</feed>