LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Real Time Signals getting EPERM (https://www.linuxquestions.org/questions/programming-9/real-time-signals-getting-eperm-273895/)

warrenpatrick 01-04-2005 05:32 PM

Real Time Signals getting EPERM
 
Hi I'm running two processes one Client, one Server. The Client sends signals to the Server one for every request it makes. If I shoot plenty of requests to the Client using normal signals I end up losing some of them. So I decided to use Real Time Signals and I end up not losing any but I start getting every now and again OPERATION NOT PERMITTED (EPERM) but not always it's very strange. Could anyone tell me why? Thanks

mhcox 08-22-2006 05:29 PM

Quote:

Originally Posted by warrenpatrick
Hi I'm running two processes one Client, one Server. The Client sends signals to the Server one for every request it makes. If I shoot plenty of requests to the Client using normal signals I end up losing some of them. So I decided to use Real Time Signals and I end up not losing any but I start getting every now and again OPERATION NOT PERMITTED (EPERM) but not always it's very strange. Could anyone tell me why? Thanks

You're probably exceeding the size of some internal queue of RT signals because the rate your server can handle the request is slower than how fast your client can generate them. You're going to have to check for that error condition and retry (maybe after a short sleep). It is strange they're using EPERM for the errorno. I'd expect something like ENOSPACE.

Mike

kshkid 08-24-2006 03:16 AM

Quote:

Originally Posted by warrenpatrick
Hi I'm running two processes one Client, one Server. The Client sends signals to the Server one for every request it makes. If I shoot plenty of requests to the Client using normal signals I end up losing some of them. So I decided to use Real Time Signals and I end up not losing any but I start getting every now and again OPERATION NOT PERMITTED (EPERM) but not always it's very strange. Could anyone tell me why? Thanks

you have your process as client and sever and i could not understand why do you have to map a request that is sent from a client to server into a signal?
If its an indication to server through a signal then what is the need for a connection between client and server ?

( with the name usage of client and server )

and coming to the signals part...

how have you registered the signals in server in view of signal reception from client?
are the signal handlers registered through older or newer semantics ?

that would help to proceed further ...

mhcox 08-24-2006 09:02 AM

Quote:

Originally Posted by kshkid
you have your process as client and sever and i could not understand why do you have to map a request that is sent from a client to server into a signal?
If its an indication to server through a signal then what is the need for a connection between client and server ?

Now that someone else has mentioned what I was thinking, what the heck are you trying to do :confused:

Although my comment would be reversed: why do you need the signal when a notification to the server of data requested is implied by most IPC methods like pipes, sockets, etc. The only IPC medium I could think of that might need a signal would be shared memory, i.e. the client is modifying some shared memory and needs to notify the server a change has been made. Is that what you're doing?

Mike

kshkid 08-25-2006 09:29 AM

Quote:

Originally Posted by mhcox
Now that someone else has mentioned what I was thinking, what the heck are you trying to do :confused:

Although my comment would be reversed: why do you need the signal when a notification to the server of data requested is implied by most IPC methods like pipes, sockets, etc. The only IPC medium I could think of that might need a signal would be shared memory, i.e. the client is modifying some shared memory and needs to notify the server a change has been made. Is that what you're doing?

Mike

Quote:

what the heck are you trying to do
Isnt tht aggressive ? Not Needed Anyway.

Quote:

The only IPC medium I could think of that might need a signal would be shared memory
here also, if we write the implementation, you go for signals and signal comm, but we have already shared memory notifiers.


All times are GMT -5. The time now is 08:17 PM.