Should I call a library function and link to a shared library to get a job done if all I have to do is fork a command read its output?
-
This is a performance question. Would it matter. But if it did, what would perform better? Calling a library function and therefore link to such a library or fork some utility and read from its output (using pipes etc)? Are there any other good reasons for doing one or the other.
-
Answer:
Sure. If the library is doing what you want, why should you reinvent the wheel? Also, assuming you're talking about C programming, reading from a process requires proper memory management. Why do it when it is already available?
Suraj Kumar at Quora Visit the source
Related Q & A:
- Where can a 14-year-old get a job in Brooklyn?Best solution by Yahoo! Answers
- Where is a good place to get a job?Best solution by careercast.com
- How can a 17 year old get a job during the summer?Best solution by Yahoo! Answers
- Where can a 14-year-old get a job in Wichita ks?Best solution by jobs2careers.com
- How do I get a job in the field I am studying for?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.