Results 1 to 3 of 3
Hi All,
Am new to linux forums .. I would like to know which one is more optimized among the below two,
1) Fork + exec
2) system() system call
...
- 05-06-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 9
Optimized programming
Hi All,
Am new to linux forums
.. I would like to know which one is more optimized among the below two,
1) Fork + exec
2) system() system call
As per my knowledge fork+exec is better since i will be avoiding invocation of shell as the system() does. But still I would like to confirm it. Linux gurus out there, please help me.
Thanks in advance
- 05-06-2008 #2
You are correct. The fork/exec combination avoids the running of a shell, and is therefore faster (all other things being equal).
--
Bill
Old age and treachery will overcome youth and skill.
- 05-06-2008 #3


Reply With Quote
