Initializing an array of structs into shared memory
问题 I'm making 4 programs that creates a POSIX shared memory object, an array of structs, that will be shared by the other 3 processes. Basically this project simulates files. Program #1 creates the object. Program #2 takes a filename and a string as arguments, then the filename and string (file contents) are saved to shared memory as a struct that is put in an available element of the array. Program #3 will list the filenames. Program #4 will search for a given file and display its contents. The