I am using execl to replace a process and that isn't working for me because when I start it, the file browser (KDE) doesn't respond until my program closes.
Is that a better function to use other than execl?
Printable View
I am using execl to replace a process and that isn't working for me because when I start it, the file browser (KDE) doesn't respond until my program closes.
Is that a better function to use other than execl?
If you are lucky there is a family of functions, spawn, just like exec that creates a new process. Otherwise you can use fork() to create a copy of the current process, and call execl only in the copy:
Code:if (fork() == 0) { // we are the copy
exec(...);
}
That does the trick. Thanks twanvl.