Skip to content

Simple Erlang middleware for resolving EOF port problem

License

Notifications You must be signed in to change notification settings

petrkozorezov/estdinout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

estdinout

Simple middleware for resolving erlang eof port problem. Erlang ports can't close stdout stream when no more data, but shell operators '|' and '<' do and some programs wait for this. For exmple, ImageMagic console command "convert", and it can be useful for server side image converting without a temp files.

Example:

    {ok, <<"hello">>} = estdinout:run("/bin/cat", <<"hello">>).
    {ok, <<"hello">>} = estdinout:run("/bin/echo -n hello", <<>>).
    {ok, SmallJpeg}   = estdinout:run("convert -resize 1024x1024 - jpg:-", BigJpeg).

🌿🐖💨💥

About

Simple Erlang middleware for resolving EOF port problem

Resources

License

Stars

Watchers

Forks

Packages

No packages published