Support Go execd plugins with shim (#7283)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user