unix - Exec real world example -


I am looking for a real world scenerio, where using the exec only would be the available option (solve the exec exec if exec Can not be used)

I know what exec is and how it is different from the thorn, but still intrested in the real world problem which applies the use of exec command Does.

< "post-text" itemprop = "text">

How will one shell start another process, using without exec ?

fork () (or better, clone () nowadays, on Linux) simply asks to duplicate a process. Then you have two copies of the same process.

execve () (and -l, -lp, -vp, -v folks) simply tells the current process to change completely (with a new process) Keeping the maintenance of FD, but not too much)

To fire another program, you must first fork () and then exec () resulting processes in one (which is usually the hair process).


Comments