-1

Using remote procedure calls, how can we have shared errno for the server side and client machines?

To clarify, here is the context of my question: I am trying to implement a distributed file system. I aim for a centralized design where I keep files on the server and clients access them through remote procedure call. So when a client opens a file, I call open on the server machine and return a buffer to the client. I want to keep shared errno values so the client will be able to detect a failure on the open call and prints the right error message.

KJohn
  • 193
  • 1
  • 1
  • 15

1 Answers1

1

Seems like your options are either:

1) add an errno (output) parameter to each of your RPC calls, or

2) define an additional RPC call to "retrieve latest errno"

Option 2 is probably a bad idea if you have any possibility for multiple simultaneous RPCs to occur (for example, threading), leaving option 1 as the remaining choice. That's the straightforward approach in any case: if the client wants to know the status of the open(), it looks at the results of that RPC call.

David Gelhar
  • 27,873
  • 3
  • 67
  • 84