Temporary in-memory filesystem
You can use your buildfile to create a temporary filesystem based on shared memory objects.
QNX OS provides a simple Shared Memory Object filesystem
that allows read/write files to be placed under /dev/shmem
(see Shared Memory Object filesystem
in the
QNX OS User's Guide).
You can link /dev/shmem to the /tmp directory
to use it store data in temporary files.
[+script] startup-script = {
procmgr_symlink /dev/shmem/ /tmp
...
This instruction sets /tmp as a symbolic link in the process manager's pathname table; this symbolic link points to the /dev/shmem directory. Because this directory is where shared memory objects are stored, this link lets you create a temporary filesystem based on shared memory objects.
For an explanation on why it's best to use procmgr_symlink to create the link, as well as guidance on using an alternative mechanism to provide a temporary in-memory filesystem for a production system, see the mkifs buildfile examples in the Utilities Reference.
