Support Go execd plugins with shim (#7283)

This commit is contained in:
Steven Soroka
2020-05-04 14:09:10 -04:00
committed by GitHub
parent 7a5690cd36
commit b73a232a6a
58 changed files with 915 additions and 65 deletions

View File

@@ -4,8 +4,16 @@
counter = 0
def time_ns_str(t)
ns = t.nsec.to_s
(9 - ns.size).times do
ns = "0" + ns # left pad
end
t.to_i.to_s + ns
end
loop do
puts "counter_ruby count=#{counter}"
puts "counter_ruby count=#{counter} #{time_ns_str(Time.now)}"
STDOUT.flush
counter += 1

View File

@@ -1,12 +1,12 @@
#!/bin/bash
#!/bin/sh
## Example in bash using STDIN signaling
counter=0
while read; do
while read LINE; do
echo "counter_bash count=${counter}"
let counter=counter+1
counter=$((counter+1))
done
(>&2 echo "terminate")
trap "echo terminate 1>&2" EXIT