# Difference between running external programs and Tasks

**URL:** <https://discourse.julialang.org/t/difference-between-running-external-programs-and-tasks/69708>\
**Category:** General Usage\
**Created:** [October 13, 2021, 6:07pm UTC](https://discourse.julialang.org/t/difference-between-running-external-programs-and-tasks/69708 "2021-10-13T18:07:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cswaney](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cswaney/32/29560_2.png) [@cswaney](https://discourse.julialang.org/u/cswaney)\
**Post date:** [October 13, 2021, 6:07pm UTC](https://discourse.julialang.org/t/difference-between-running-external-programs-and-tasks/69708/1 "2021-10-13T18:07:56Z")

</div>

The Julia documentation states that external programs run using `run(Cmd)` are “run as `julia` 's immediate child process, using `fork` and `exec` calls.” By default, `julia` waits for the program to return, but commands can also be run asynchronously. Run this way, these external programs appear similar to coroutines, i.e., `Task`s. Is there any difference between the two besides the fact that one is running an operating system command and the other is running Julia code?

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [October 13, 2021, 10:59pm UTC](https://discourse.julialang.org/t/difference-between-running-external-programs-and-tasks/69708/2 "2021-10-13T22:59:15Z")

</div>

Tasks share memory within Julia, external programs are entirely different OS processes, so they have different file descriptors and different memory spaces.
