Skip to main content
6 votes

Shell Script Design Patteren: Source a library file VS Call different files?

First piece of advice is to echo Stefano Borini: "don't." Some languages offer good support for core software engineering concepts without the need of supporting 1970's sh syntax. Prefer ...
J_H's user avatar
  • 7,605
5 votes
Accepted

Proper way of handling EINTR in libraries

Always leave the decision of how to handle EINTR to the user, and make it easy to resume the operation as appropriate. Usually the best way to do that is to return from your library function to the ...
mtraceur's user avatar
  • 259
3 votes

What is the advantage of POSIX queue or just normal data structure queue?

A POSIX queue (see mq_overview(7)) is for inter-process communication (so is quite expensive, but it could be used for inter-thread communication). You could use a queue data structure protected by e....
Basile Starynkevitch's user avatar
1 vote

Help architect a timer-based scheduler

If you consider timers that expire less than one second from each other to have expired at the same time, then your solution of waiting on a condition variable and then sleeping an additional second ...
Bart van Ingen Schenau's user avatar
1 vote

copying of memory vs pointer to memory in real time systems

For this specific situation, I don't see why you need the "producer" and the "consumer" to be in separate threads. So if this specific situation is the only one you care about, then don't copy the ...
TheZouave's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible