We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27fefd8 commit 02c48a8Copy full SHA for 02c48a8
lib/elixir/lib/port.ex
@@ -138,16 +138,15 @@ defmodule Port do
138
you can wrap the application in a script that checks for stdin. Here is such
139
script in bash:
140
141
- #!/bin/bash
142
- name=$1
143
- shift
144
- $name $*
+ #!/bin/sh
+ "$@"
145
pid=$!
146
while read line ; do
147
:
148
- done < /dev/stdin
+ done
149
kill -KILL $pid
150
+
151
Now instead of:
152
153
Port.open({:spawn_executable, "/path/to/program"},
0 commit comments