I don\'t want to use system() in my C program, because system(3) blocks and this is not what I want. What is the optimal way to do it?
If in windows, use the ShellExecute() function from the Windows API.
ShellExecute()
If in Unix, go for fork() then system() as mentioned.
fork()
system()