pleroma/changelog.d/exile.skip
Mark Felder 0ac010ba3f Replace custom fifo implementation with Exile
This is for streaming media to ffmpeg thumbnailer. The existing implementation relies on undocumented behavior.

Erlang open_port/2 does not officially support passing a string of a file path for opening. The specs clearly state you are to provide one of the following for open_port/2:

    {spawn, Command :: string() | binary()} |
    {spawn_driver, Command :: string() | binary()} |
    {spawn_executable, FileName :: file:name_all()} |
    {fd, In :: integer() >= 0, Out :: integer() >= 0}

Our method technically works but is strongly discouraged as it can block the scheduler and dialyzer throws errors as it recognizes we're breaking the contract and some of the functions we wrote may never return.

This is indirectly covered by the Erlang FAQ section "9.12 Why can't I open devices (e.g. a serial port) like normal files?"
https://www.erlang.org/faq/problems#idm1127
2024-01-22 10:13:17 -05:00

0 lines
Plaintext