3 ms·
> When you start a program in a debugger like gdb, it does a variation of the usual fork()–exec() trick It would be helpful if there was a link explaining the
by jcrben 11y ago
> When you start a program in a debugger like gdb, it does a variation of the usual fork()–exec() trick
It would be helpful if there was a link explaining the 'usual' fork()–exec() trick.
- groovy2shoes 11y agoIt's pretty simple, really. The process first calls fork() to create a child process. The child process then calls exec() to replace itself with another executable. This is the typical way you'd launch a process on any UNIX-like system. For example, it's how the shell will create a process when you issue a command.