Sponsored Content
Full Discussion: msgrcv pending forever !!!
Top Forums Programming msgrcv pending forever !!! Post 94591 by Corona688 on Monday 2nd of January 2006 01:57:19 AM
Old 01-02-2006
Checking it's manpage, I see one possible return value for it being 'EINTR -- while the process was sleeping to recieve a message, the process caught a signal.' So alarm() might be useful, if it'll cause it to return EINTR instead of killing the process.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

msgrcv : Invalid argument

Hi All, Please guide me how to get rid : msgrcv : Invalid argument. I am using message queues: msgsnd and msgrcv, I am able to send through msgsnd and receive through msgrcv, but at times i get the belo error. msgrcv : Invalid argument. (1 Reply)
Discussion started by: answers
1 Replies

2. AIX

msgrcv crash in AIX 5.3 SP6

Hi All, I have a piece of code like blow. It is working fine with AIX 5.3 SP3. When the same thing is getting executed in AIX 5. SP6 it is giving segmentation fault. If I put debug statements before and after, it works fine. rc = msgrcv(mqid, &msg, size, HIGH_PRIORITY_FIRST , 0) ... (0 Replies)
Discussion started by: sandhya_chp
0 Replies

3. IP Networking

valid_lft forever preferred_lft forever <-- what does this mean?

Just looking at my ethernet interface.. I see this response... what does this mean...? ipconfig... lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft... (0 Replies)
Discussion started by: jimmyc
0 Replies

4. Programming

C Posix - msgsnd() msgrcv

Hey guys, Im doing message passing for the first time on a linux OS. Im new to C programming, so bear with me. I made two .c files : central.c and external.c I simply wanted to pass a message from the central process to the external process. BUT Whenever each process gets to the... (3 Replies)
Discussion started by: carl33p
3 Replies

5. UNIX for Dummies Questions & Answers

IPC Message Queue. msgrcv doesnt work..

Hi everybody, this is the situation. there is a programm XYZ which opens a message queue with the key 47110815 and waits for a SIGUSR1. After receiving this signal it sends a message with type 100 and a number (as ASCII) in the message-body. I have to write a prog which frist sends the... (1 Reply)
Discussion started by: daredevil82m
1 Replies

6. UNIX for Dummies Questions & Answers

pending signals

I was wondering about following. If I have set of 3 signals. And they are all blocked.Now at some point in the program the set is unblocked. Which signal will be delivered first.This is my set....SIGTSTP,SIGQUIT,SIGINT.When I added them in the set and unblock them I did it in following order... ... (1 Reply)
Discussion started by: joker40
1 Replies

7. Programming

How can I tell when recv is finished with pending data?

I'm working with recv and I am having a heck of a lot of trouble ignoring excess data that I did not ask for. I was hoping someone could shine some light on the subject for me because I'm not getting anywhere fast. ---------- Post updated at 02:46 AM ---------- Previous update was at 12:31 AM... (2 Replies)
Discussion started by: Errigour
2 Replies

8. UNIX for Dummies Questions & Answers

Forever -w option

I am trying to use the forever command. I can get it to work if I do not use the w option to watch for changes and cause an automatic restart on a change to the contents of the directory being watched. I would really like to use the watch option. Is this option fully implemented? here is an... (4 Replies)
Discussion started by: barrygordon
4 Replies
SIGSUSPEND(2)						     Linux Programmer's Manual						     SIGSUSPEND(2)

NAME
sigsuspend - wait for a signal SYNOPSIS
#include <signal.h> int sigsuspend(const sigset_t *mask); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): sigsuspend(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE DESCRIPTION
sigsuspend() temporarily replaces the signal mask of the calling process with the mask given by mask and then suspends the process until delivery of a signal whose action is to invoke a signal handler or to terminate a process. If the signal terminates the process, then sigsuspend() does not return. If the signal is caught, then sigsuspend() returns after the sig- nal handler returns, and the signal mask is restored to the state before the call to sigsuspend(). It is not possible to block SIGKILL or SIGSTOP; specifying these signals in mask, has no effect on the process's signal mask. RETURN VALUE
sigsuspend() always returns -1, with errno set to inndicate the error (normally, EINTR). ERRORS
EFAULT mask points to memory which is not a valid part of the process address space. EINTR The call was interrupted by a signal. CONFORMING TO
POSIX.1-2001. NOTES
Normally, sigsuspend() is used in conjunction with sigprocmask(2) in order to prevent delivery of a signal during the execution of a criti- cal code section. The caller first blocks the signals with sigprocmask(2). When the critical code has completed, the caller then waits for the signals by calling sigsuspend() with the signal mask that was returned by sigprocmask(2) (in the oldset argument). See sigsetops(3) for details on manipulating signal sets. SEE ALSO
kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), sigwaitinfo(2), sigsetops(3), sigwait(3), signal(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2013-04-19 SIGSUSPEND(2)
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy