This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open3' | |
Open3.popen3('bash', 'test.sh', 'arg1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open3' | |
a = (1..40000000).to_a | |
Open3.popen3('sleep 1') | |
# `sleep 1` same error happens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f = File.new('/tmp/test.log', 'a+') | |
$stdout.reopen f | |
10.times do | |
puts "hello" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "deque.h" | |
t_deque *dequeInit(void) | |
{ | |
t_deque *deque; | |
deque = malloc(sizeof(t_deque)); | |
deque->first = NULL; | |
deque->last = NULL; | |
return deque; |