havenwood changed the topic of #ruby to: Ruby 3.3.4 (3.4.0-preview1) https://www.ruby-lang.org | Logs https://libera.irclog.whitequark.org/ruby
infernix has quit [Ping timeout: 252 seconds]
mtm has quit [Ping timeout: 245 seconds]
mtm has joined #ruby
aestheti1 is now known as aesthetikx
xlymian has quit [Ping timeout: 276 seconds]
infernix has joined #ruby
TCZ has quit []
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 264 seconds]
desnudopenguino has joined #ruby
pgib has joined #ruby
desnudopenguino1 has quit [Ping timeout: 248 seconds]
entropie has quit [Ping timeout: 244 seconds]
entropie has joined #ruby
entropie has quit [Ping timeout: 264 seconds]
entropie has joined #ruby
pgib has quit [Quit: 00 PC LOAD LETTER]
desnudopenguino has quit [Ping timeout: 248 seconds]
desnudopenguino has joined #ruby
fercell has joined #ruby
desnudopenguino has quit [Ping timeout: 272 seconds]
Rounin has quit [Ping timeout: 248 seconds]
xlymian has joined #ruby
Linux_Kerio has joined #ruby
cappy has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
brokkoli_origin has quit [Remote host closed the connection]
brokkoli_origin has joined #ruby
konsolebox has joined #ruby
Fridtjof has quit [Quit: ZNC - http://znc.in]
Fridtjof has joined #ruby
Rounin has quit [Ping timeout: 244 seconds]
Rounin has joined #ruby
peebs has joined #ruby
johnjaye has quit [Read error: Connection reset by peer]
johnjaye has joined #ruby
jmcgnh has quit [Ping timeout: 252 seconds]
peebs has quit [Quit: Konversation terminated!]
jmcgnh has joined #ruby
Vonter has quit [Ping timeout: 276 seconds]
brokkoli_origin has quit [Ping timeout: 252 seconds]
brokkoli_origin has joined #ruby
Vonter has joined #ruby
brokkoli_originl has joined #ruby
brokkoli_originl has quit [Client Quit]
Gestahlt has joined #ruby
<Gestahlt> Hi! I am getting desperate a bit - Im trying to create for my API a shell runner used for pipelines and such. I use Open3.popen3 to execute shell commands. I kinda understand how it works, but what baffles me is following - I run popen3 with the cmd arg /bin/bash (or whatever is defined as interpreter) - Then i use stdin.puts to send commands to
<Gestahlt> that interpreter (at least i hope it is like that). All works, i can read stdout/stderr and exit code depending on what and how i do it. Now where i am stuck is when i send for example "sleep 300 &" - I would expect that sleep 300 is executed in the background and the next command comes immediatly - it doesnt. It just sleeps for 300 and does not
<Gestahlt> execute the following command. Any idea why?
<leftylink> hmm. it does seem to background for me and immediately execute the following command, so I guess my setup differs from yours in some way. wonder what way that could be
<leftylink> and e.g. if I issue 'jobs' I can see the backgrounded sleep
<Gestahlt> Hm, im also contemplating. Im currently considering if its because of my read for stdout/stderr.
<Gestahlt> but reading the stdout/stderr should not block at the sleep in the bg
<Gestahlt> It should block the "parent" thread - thats what i expect actually (So it never gets into a finished state), but thats okay and expected.
<leftylink> to show my work of what I thought worked as expected on my machine: https://termbin.com/bprf
gemmaro_ has joined #ruby
<leftylink> for me it immediately prints the two strings and "[1] + Running" indicating the backgrounded sleep
<leftylink> and if I understand the problem description correctly, on the problematic machine, instead it will not print the second string (or it will sleep before doing so, something like that)
cappy has left #ruby [Leaving]
<Gestahlt> Something like that. But you showed me something good where i was not sure - puts does produce an result immediatly. Thats good to know
<Gestahlt> Okay funky - when i try to get the stdout immediatly (myarray << stdout.readline) it blocks - even without the bg
<Gestahlt> I try to run the same thing in irb
<Gestahlt> yea works fine there
<Gestahlt> hrrrrm
<Gestahlt> but what i dont see, is the /bin/sh process
<Gestahlt> on the OS
<Gestahlt> i wonder why
<Gestahlt> Aaah
<Gestahlt> because it exited - the bg process is spawned outside of the current shell. That makes the issue only weirder
<Gestahlt> Maybe Sinatra is interfering?
<Gestahlt> Hm i guess it has something to do with Sinatra - Since it works fine in a simple ruby script, on irb i guess something is happening in that context. I also tested the tty-command gem - and its the same issue
mtm has quit [Ping timeout: 276 seconds]
mtm has joined #ruby
<Gestahlt> Okay i think i got it
<Gestahlt> Its indeed related to Sinatra or app servers in general
<Gestahlt> i think i need to spawn a worker for this kind of stuff
<Gestahlt> What would be your recommendation? Fibers, Thread or Ractors?
Starfoxxes has joined #ruby
crivic has joined #ruby
brokkoli_origin has quit [Remote host closed the connection]
crivic has quit [Quit: crivic was here]
brokkoli_origin has joined #ruby
xuochi has joined #ruby
xuochi has quit [Client Quit]
<adam12> Gestahlt: Suckerpunch maybe? I didn't see what you needed exactly.
sadome has joined #ruby
sadome has joined #ruby
sadome has quit [Changing host]
sadome has quit [Excess Flood]
<adam12> You could just spin up a new Thread and see if that helps. Thread.new do ...yourcode... end
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
sadome has joined #ruby
sadome has quit [Excess Flood]
sadome has joined #ruby
sadome has quit [Excess Flood]
Tempesta has quit [Read error: Connection reset by peer]
polishdub has quit [Quit: leaving]
user71 has joined #ruby
desnudopenguino has joined #ruby
polishdub has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
desnudopenguino has quit [Ping timeout: 252 seconds]
c10l2 has joined #ruby
c10l has quit [Ping timeout: 248 seconds]
c10l2 is now known as c10l
Gestahlt has quit [Quit: Client closed]
peebs has joined #ruby
brokkoli_origin has quit [Ping timeout: 264 seconds]
brokkoli_origin has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
jvalleroy has quit [Changing host]
jvalleroy has joined #ruby
mark22k has quit [Quit: The Lounge - https://thelounge.chat]
mark22k has joined #ruby
mark22k has quit [Quit: The Lounge - https://thelounge.chat]
mark22k has joined #ruby
balrog has quit [Quit: Bye]
balrog has joined #ruby
Vonter has quit [Quit: WeeChat 4.3.5]
Vonter has joined #ruby
Starfoxxes has quit [Remote host closed the connection]
sphex has quit [Remote host closed the connection]
desnudopenguino has joined #ruby
sphex has joined #ruby
desnudopenguino has quit [Client Quit]
desnudopenguino has joined #ruby
desnudopenguino1 has joined #ruby
FetidToot has joined #ruby
desnudopenguino has quit [Ping timeout: 272 seconds]
desnudopenguino1 is now known as desnudopenguino
FetidToot3 has quit [Quit: The Lounge - https://thelounge.chat]
pushrad has quit [Quit: Leaving]
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
FetidToot has quit [Client Quit]
FetidToot has joined #ruby
user71 has quit [Quit: Leaving]
bambanxx has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
peebs has quit [Quit: Konversation terminated!]
Linux_Kerio has quit [Ping timeout: 244 seconds]
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
bambanxx has quit [Client Quit]
bambanxx has joined #ruby
xlymian has quit [Ping timeout: 276 seconds]
konsolebox has quit [Quit: .]
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
peebs has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
joako has quit [Quit: quit]
xlymian has joined #ruby
joako has joined #ruby
brokkoli_origin has quit [Ping timeout: 264 seconds]
brokkoli_origin has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
brokkoli_origin has quit [Ping timeout: 248 seconds]
brokkoli_origin has joined #ruby
xlymian has quit [Read error: Connection reset by peer]
xlymian has joined #ruby
gr33n7007h has quit [Ping timeout: 248 seconds]