Relative Content

Tag Archive for clinux

File descriptors 3-5 in linux

I’m doing an university project where storing files in an array of pointers indexed by their file descriptors is required. I know file descriptors 0 to 2 are stdin, stdout and stderr respectively but i do not know what file descriptors 3-5 are named.

File descriptors 3-5 in linux

I’m doing an university project where storing files in an array of pointers indexed by their file descriptors is required. I know file descriptors 0 to 2 are stdin, stdout and stderr respectively but i do not know what file descriptors 3-5 are named.

File descriptors 3-5 in linux

I’m doing an university project where storing files in an array of pointers indexed by their file descriptors is required. I know file descriptors 0 to 2 are stdin, stdout and stderr respectively but i do not know what file descriptors 3-5 are named.

File descriptors 3-5 in linux

I’m doing an university project where storing files in an array of pointers indexed by their file descriptors is required. I know file descriptors 0 to 2 are stdin, stdout and stderr respectively but i do not know what file descriptors 3-5 are named.

File descriptors 3-5 in linux

I’m doing an university project where storing files in an array of pointers indexed by their file descriptors is required. I know file descriptors 0 to 2 are stdin, stdout and stderr respectively but i do not know what file descriptors 3-5 are named.

May readdir() cause OOM?

I tried to iterate through a directory in Linux system. The program is run on a chip, so OS memory is limited in 25MB. The directory only contains images, each with size about 3MB. What program does is read each image in the file and do some process. But program failed when reading about the 4000th image, and I am not able to find out the reason.

File Descriptor sharing between processes

My goal is to open the device in one process and then close it in another (not fork).
I don’t want to use UNIX socket. I found that starting kernel 5.6 there are two new syscalls: syscall(SYS_pidfd_open, pid, flags) and syscall(SYS_pidfd_getfd, pidfd, 0, 0).

BUG in linux sockets?

Problem: I created a raw socket with the UDP protocol, sent a packet consisting of a UDP header and data, everything is fine in the PP, the packet is correct, I also created the same socket in another program, and it accepted the data that I sent, but along with the IP header. How so? Why isn’t this written anywhere?
That is, we send DATA+UDP, and receive from the same socket DATA+UDP+IP.