Last week's article on syslets briefly mentioned a problem with using file descriptors for low-level communications with the kernel. There is a single namespace for file descriptors, combined with a ...
Have you ever wanted to read a file one line at a time in a shell script and found the task to be a lot more trouble than you ever imagined? If you use a “for line ...
the logic of which FDs to propagate to be kept at the place where the FD is created - likely a totally different piece of code to that which does the fork/exec The code that calls fork()/exec() ought ...
The fcntl i.e. file descriptor control function provides a way of working with a file descriptor to find out the status of the file and to modify the way it is used. It is very similar to the ioctl ...
Last week’s column looked at how we can read from and write to files by associated the files with user-defined file descriptors. This week, we take this idea a bit further. Closing File Descriptors In ...
The actual permissions that result are complicated by the fact that the process has a default permissions mask - umask. The effective permissions are given by mode & ~umask which means that the bits ...