How do you create special files like named pipes and device files?
The system call method forms special files in the following sequence.
- Kernel assigns new inode,
- Sets the file type to show that the file is a pipe, directory or special file,
- If it is a device file, it makes the other entries like main, minor device numbers.
For example:
If the device is a disk, main device number refers to the disk controller and minor device number is the disk.