# \#ports

**URL:** https://forum.elixirforum.com/tag/ports/513.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [FreeBSD Capsicum for sandboxing ports](https://forum.elixirforum.com/t/freebsd-capsicum-for-sandboxing-ports/73341)

<div class="topic-metadata">

**Author:** [@carlgleisner](https://forum.elixirforum.com/u/carlgleisner)\
**Replies:** 2\
**Last updated:** [December 22, 2025, 2:22pm UTC](https://forum.elixirforum.com/t/freebsd-capsicum-for-sandboxing-ports/73341 "2025-12-22T14:22:31Z")

</div>

Hi all, I came across this lovely lightning talk about sandboxing using, among other things, Capsicum on FreeBSD: It was posted on the Erlang forums as well: In the lightning talk, Krasen talks about N…

---

## [Use env variables with System.cmd or Ports?](https://forum.elixirforum.com/t/use-env-variables-with-system-cmd-or-ports/14924)

<div class="topic-metadata">

**Author:** [@beardedeagle](https://forum.elixirforum.com/u/beardedeagle)\
**Replies:** 21\
**Last updated:** [June 25, 2025, 1:33am UTC](https://forum.elixirforum.com/t/use-env-variables-with-system-cmd-or-ports/14924 "2025-06-25T01:33:18Z")

</div>

I’m trying to figure out how to be able to expand ENV variables in either Port or System.cmd. Porcelain seems to be capable of this, but I cannot do it with either Port or System.cmd: iex(5)\> System.cmd("/bin/echo", \["$…

---

## [Getting random error: erl\_child\_setup: failed with error 32 on line 282 (using Port)](https://forum.elixirforum.com/t/getting-random-error-erl-child-setup-failed-with-error-32-on-line-282-using-port/66756)

<div class="topic-metadata">

**Author:** [@msante](https://forum.elixirforum.com/u/msante)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 10:22pm UTC](https://forum.elixirforum.com/t/getting-random-error-erl-child-setup-failed-with-error-32-on-line-282-using-port/66756 "2024-10-29T22:22:12Z")

</div>

Sorry if my question is silly, I am relatively new to Elixir. I made a small module to handle the execution of external programs. This is my code: defmodule Abn.Shell do @default\_timeout 2000 @default\_retry 2 @de…

---

## [Problem with Port exiting prematurely (with pid :EXIT} in Elixir 1.17/OTP 26 application](https://forum.elixirforum.com/t/problem-with-port-exiting-prematurely-with-pid-exit-in-elixir-1-17-otp-26-application/65227)

<div class="topic-metadata">

**Author:** [@pzingg](https://forum.elixirforum.com/u/pzingg)\
**Replies:** 2\
**Last updated:** [August 19, 2024, 12:44pm UTC](https://forum.elixirforum.com/t/problem-with-port-exiting-prematurely-with-pid-exit-in-elixir-1-17-otp-26-application/65227 "2024-08-19T12:44:33Z")

</div>

I have an application that ran fine in Elixir 1.14, OTP 25, but has a problem in Elixir 1.17, OTP 26. I am on Ubuntu 22.04. The application opens a Port to an executable (rscript) that performs some calculations, and sen…

---

## [Stress testing: doing something as quickly as possible at the "same time"](https://forum.elixirforum.com/t/stress-testing-doing-something-as-quickly-as-possible-at-the-same-time/60062)

<div class="topic-metadata">

**Author:** [@thoughtarray](https://forum.elixirforum.com/u/thoughtarray)\
**Replies:** 0\
**Last updated:** [November 30, 2023, 9:54pm UTC](https://forum.elixirforum.com/t/stress-testing-doing-something-as-quickly-as-possible-at-the-same-time/60062 "2023-11-30T21:54:10Z")

</div>

Hello, this is my first post, and I hope it isn’t already obviously answered in another post. I did my best to look. Problem statement I want to do something as quickly as possible at the “same time” (as possible). To s…

---

## [Exile - NIF based alternative to ports for running external programs. Provides back-pressure using non-blocking io](https://forum.elixirforum.com/t/exile-nif-based-alternative-to-ports-for-running-external-programs-provides-back-pressure-using-non-blocking-io/31639)

<div class="topic-metadata">

**Author:** [@akash-akya](https://forum.elixirforum.com/u/akash-akya)\
**Replies:** 25\
**Last updated:** [November 16, 2022, 8:34am UTC](https://forum.elixirforum.com/t/exile-nif-based-alternative-to-ports-for-running-external-programs-provides-back-pressure-using-non-blocking-io/31639 "2022-11-16T08:34:54Z")

</div>

Exile is an alternative to beam ports for running external programs. It provides back-pressure using non-blocking io, and tries to fix all issues associated with ports. Github: GitHub - akash-akya/exile: Alternative to …

---

## [Why port doesn’t provide exit code when it’s closed?](https://forum.elixirforum.com/t/why-port-doesn-t-provide-exit-code-when-it-s-closed/47027)

<div class="topic-metadata">

**Author:** [@vfsoraki](https://forum.elixirforum.com/u/vfsoraki)\
**Replies:** 2\
**Last updated:** [April 4, 2022, 12:24pm UTC](https://forum.elixirforum.com/t/why-port-doesn-t-provide-exit-code-when-it-s-closed/47027 "2022-04-04T12:24:51Z")

</div>

Basically the title. I can’t find any information on how to get the exit code of a port when it’s closed, whether from Elixir or when it’s closed by itself (for some other reason). System.cmd function returns the exit c…

---

## [Diagnosing port communications issue](https://forum.elixirforum.com/t/diagnosing-port-communications-issue/42490)

<div class="topic-metadata">

**Author:** [@Maxximiliann](https://forum.elixirforum.com/u/Maxximiliann)\
**Replies:** 2\
**Last updated:** [September 20, 2021, 1:22am UTC](https://forum.elixirforum.com/t/diagnosing-port-communications-issue/42490 "2021-09-20T01:22:51Z")

</div>

defmodule PythonProcessAPI do require Logger def process\_output(foo, \_, python\_path) do Print.text("Results received from #{python\_path}.") Logger.info("#{inspect(foo)}, \_\_MODULE\_\_, line 8") end def co…

---

## [Using environment variables with ports](https://forum.elixirforum.com/t/using-environment-variables-with-ports/40506)

<div class="topic-metadata">

**Author:** [@autodidaddict](https://forum.elixirforum.com/u/autodidaddict)\
**Replies:** 3\
**Last updated:** [June 17, 2021, 12:22pm UTC](https://forum.elixirforum.com/t/using-environment-variables-with-ports/40506 "2021-06-17T12:22:07Z")

</div>

In this previous post here, the poster asks the same question I have. I cannot seem to get the syntax correct in order to launch a Port with environment variables. The solution shows how to do it using System.cmd, but I…

---

## [Call FFMPEG with Complex Filter from Ports](https://forum.elixirforum.com/t/call-ffmpeg-with-complex-filter-from-ports/38787)

<div class="topic-metadata">

**Author:** [@flp](https://forum.elixirforum.com/u/flp)\
**Replies:** 5\
**Last updated:** [April 14, 2021, 8:43pm UTC](https://forum.elixirforum.com/t/call-ffmpeg-with-complex-filter-from-ports/38787 "2021-04-14T20:43:32Z")

</div>

I’m trying to call FFMPEG with a complex filter from Ports, but despite the command working in my shell, I somehow miss the understanding to get it working in Elixir with ports when combined with a complex filter. This …

---

## [Os\_mon errors during shutdown on Heroku - advice on where to solve this?](https://forum.elixirforum.com/t/os-mon-errors-during-shutdown-on-heroku-advice-on-where-to-solve-this/35197)

<div class="topic-metadata">

**Author:** [@engineeringdept](https://forum.elixirforum.com/u/engineeringdept)\
**Replies:** 0\
**Last updated:** [October 28, 2020, 5:28pm UTC](https://forum.elixirforum.com/t/os-mon-errors-during-shutdown-on-heroku-advice-on-where-to-solve-this/35197 "2020-10-28T17:28:04Z")

</div>

OK, here’s a tricky issue, and I’m looking for a bit of advice about where to solve it… We just enabled the New Relic agent in our Elixir app. It uses os\_mon, from OTP, to poll for the cpu utilisation and report it back…

---

## [ExCmd - communicate with external programs with back pressure](https://forum.elixirforum.com/t/excmd-communicate-with-external-programs-with-back-pressure/30157)

<div class="topic-metadata">

**Author:** [@akash-akya](https://forum.elixirforum.com/u/akash-akya)\
**Replies:** 18\
**Last updated:** [August 8, 2020, 4:33pm UTC](https://forum.elixirforum.com/t/excmd-communicate-with-external-programs-with-back-pressure/30157 "2020-08-08T16:33:09Z")

</div>

Hi all, I’m tinkering around the idea of streaming data through an external program (think streaming video through ffmpeg command and receiving the output back) from the last few weeks. Mainly focused on communicating w…

---

## [Importing a Phoenix app as a dependency in another phoenix app in an umbrella project... Please any advice?](https://forum.elixirforum.com/t/importing-a-phoenix-app-as-a-dependency-in-another-phoenix-app-in-an-umbrella-project-please-any-advice/33144)

<div class="topic-metadata">

**Author:** [@Kurisu](https://forum.elixirforum.com/u/Kurisu)\
**Replies:** 4\
**Last updated:** [July 16, 2020, 9:34pm UTC](https://forum.elixirforum.com/t/importing-a-phoenix-app-as-a-dependency-in-another-phoenix-app-in-an-umbrella-project-please-any-advice/33144 "2020-07-16T21:34:11Z")

</div>

I have two Phoenix web app in an umbrella project: admin and front. I will probably add another web app blog soon. I added :front app as a dependency in the :admin app so I can generate urls to the “Front website”. This…

---

## [Best practice to start a external process and interact via udp with it. (all in one GenServer?)](https://forum.elixirforum.com/t/best-practice-to-start-a-external-process-and-interact-via-udp-with-it-all-in-one-genserver/32511)

<div class="topic-metadata">

**Author:** [@denna](https://forum.elixirforum.com/u/denna)\
**Replies:** 0\
**Last updated:** [June 21, 2020, 8:07am UTC](https://forum.elixirforum.com/t/best-practice-to-start-a-external-process-and-interact-via-udp-with-it-all-in-one-genserver/32511 "2020-06-21T08:07:40Z")

</div>

I am learning currently Elixir. I want to start a external process and interact with it via udp. Currently I set up a GenServer to start the process using a Port.And than I found an implementation that sets up a separa…

---

## [Finding the file descriptor for an open long-lived http connection](https://forum.elixirforum.com/t/finding-the-file-descriptor-for-an-open-long-lived-http-connection/30235)

<div class="topic-metadata">

**Author:** [@wanderanimrod](https://forum.elixirforum.com/u/wanderanimrod)\
**Replies:** 3\
**Last updated:** [April 7, 2020, 4:33pm UTC](https://forum.elixirforum.com/t/finding-the-file-descriptor-for-an-open-long-lived-http-connection/30235 "2020-04-07T16:33:16Z")

</div>

Hello hivemind, Is there way to find the file descriptor associated with a long-lived tcp connection in elixir / erlang? I am using the HTTPoison library (and hence :hackney) for http calls. I need to send the file desc…

---

## [How would you do OCaml \<=\> Elixir/Erlang \<=\> OCaml communication?](https://forum.elixirforum.com/t/how-would-you-do-ocaml-elixir-erlang-ocaml-communication/14929)

<div class="topic-metadata">

**Author:** [@loxs](https://forum.elixirforum.com/u/loxs)\
**Replies:** 4\
**Last updated:** [July 2, 2018, 3:48pm UTC](https://forum.elixirforum.com/t/how-would-you-do-ocaml-elixir-erlang-ocaml-communication/14929 "2018-07-02T15:48:37Z")

</div>

Hi, I’m building an application with the following infrastructure: OCaml native as an erlang port Elixir/Phoenix for transport/orchestration layer OCaml on the frontend (probably a mix between js\_of\_ocaml and bucklescr…

---

## [Choose the right way to integrate c++ code](https://forum.elixirforum.com/t/choose-the-right-way-to-integrate-c-code/13815)

<div class="topic-metadata">

**Author:** [@kokolegorille](https://forum.elixirforum.com/u/kokolegorille)\
**Replies:** 3\
**Last updated:** [April 23, 2018, 1:01pm UTC](https://forum.elixirforum.com/t/choose-the-right-way-to-integrate-c-code/13815 "2018-04-23T13:01:20Z")

</div>

Hello everyone, I would like to integrate some c++ code to Elixir. The library is GitHub - online-go/score-estimator: The score estimator and dead stone removal suggester used on online-go.com. · GitHub. This is a c++ …
