Skip to content
Advertisement

Tag: c++

What end of stream dup2 change?

What end of the stream does dub2 ( ) change is it the end the OS is connected to or the end connected to application . this code redirect output to file and not the screen which means that input side of stream is connected now to the file right . Answer Before the dup2(), the file descriptor table for

Data gets distorted which is printed in loop

Facing issue when printing the data that is updated in malloc. In the below code am creating a string Test.DataType_1.Tag_1 …. Test.DataType_1.Tag_20 in create_tags() function, when the data is updated properly and printed i create_tags() function it prints properly but if printed in main() function in for loop data is distorted. The output of the code is follows, when i

POSIX shared memory model

Is there a memory model specification for POSIX shared memory (across processes)? I’m hoping that there’s something to comparable to the C++ memory model, in order to answer questions like the following: Is there a definition of a data race? Are data races undefined behavior (as in C++)? Is there something to constrain memory visibility order across processes? I know

Advertisement