리눅스에서는 안해봤지만 비슷할 거라 생각하는데요. alarm(원하는초); msgrcv(..); // blocking mode 이렇게 주시면 메시지를 받지 못하면 msgrcv를 탈출하게 됩니다. Hope This help.