Our example demonstrates how to replace the current process with another one using Crystal’s implementation of the classic exec function.
When we run our program it is replaced by ls.
Note that Crystal, like many high-level languages, does not offer a classic Unix fork function. However, Crystal provides other mechanisms for concurrency and process management, such as fibers and spawning processes, which cover most use cases where you might use fork in other languages.