Skip to content

Tag: c++

POSIX threads vs parallelism

Do POSIX threads (managing by pthread library) works parallelly? My lecturer has told us that this library creates only user threads, that are not managed by Linux kernel. I wrote some code that fill large matrix and compared times of execution for threads and whole program and it seems to works parallelly. C…

Many-to-one two-way communication of separate programs

I’m trying to make two-way many-to-one communication between programs in Linux. My plan is the following: One program called “driver” that talks with the hardware needs to communicate with an unknown number of applications in Linux. I read that one of the most common ways for inter process c…

can’t access my inherited class attributes

I am working on a project for my job to encode/decode into buffers DNS Records objects in C++. Some records have the same infos, so I created a class Dns message with theses basic infos: The DnsClass and DnsTypes are enum with the differents class/types I use. Then I have my sub-classes for each record, I wil…

Shell append redirection replaces existing text?

For our school assignment, we have to implement input/output redirection. I managed to get the input and output redirection work, but I am facing an issue with append redirection. I am using testfile.txt: When the user types ls >> testfile.txt, I expect the output from ls to be added to the testfile. At…