shmat_msg
struct shmat_msg msg;
struct shmat_msg msg;
handle_shmat(pid_t pid, struct shmat_msg *shmat_msg,
size_t new_size = shmat_msg->size;
shmseg = shm_find_segment_by_shmid(shmat_msg->shmid);
(shmat_msg->shmflg & SHM_RDONLY) ? IPC_R : IPC_R|IPC_W);
if (shmat_msg->size > shmseg->shm_segsz) {
idatt->shmid = shmat_msg->shmid;
int handle_shmat(pid_t, struct shmat_msg *, struct cmsgcred *);
struct shmat_msg shmat_msg;
receive_msg_with_cred(fd_recv, (char *)&shmat_msg,
sizeof(shmat_msg), &cred);
&shmat_msg, &cred);