CLONE_FILES example

This post we will write a code, which will give us an observation what changes when CLONE_FILES is added and when it is removed.

Code:


Output:



Notes:

1. You can see from the code when we passed CLONE_FILES, when the child close file descriptor, it was closed in the parent process file descriptor too.

2. So, any operations which are performed on file descriptor (read, write, fcntl) by one process will affect the other process too

Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig