Skip to content

Enhance error handling in client-server programs to drive-off of LOC() machinery. #69

@gapisback

Description

@gapisback

The core error handling in the client-server programs inherited from Michael Kerrisk's sample client-server program site have a consistent interface for reporting errors which is quite amenable to be extended to use LOC() encoding.

In error_functions.c we have functions defined as:

 88 void
 89 errMsg(const char *format, ...)

106 void
107 errExit(const char *format, ...)

There could be multiple callers to such error functions, like in svmsg_file_client.c:

 60     if (msgctl(clientId, IPC_RMID, NULL) == -1) {
 61         errExit("msgctl clientId");

 91     if (serverId == -1) {
 92         errExit("msgget - server message queue");

 96     if (clientId == -1) {
 97         errExit("msgget - client message queue");

This is a very natural use-case where we can drop-in one of LOC() or LOC-ELF() encoding schemes behind the scenes of these function calls.

Implement this integration so it can be demo'ed as a real-life use-case for LOC techniques.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions