|
|
| Author |
Message |
trancequility
|
|
Lets look at some nharmon code
|
Sep 9 23:23 UTC 2007 |
-bash-3.2$ more /a/n/h/nharmon/test.rb
#!/usr/bin/ruby
pid = fork do
Signal.trap('HUP') do
Process.kill("HUP", Process.getpgrp())
end
threads=[]
threads[0]=Thread.new %x{/usr/local/bin/pico}
loop do
sleep 60
end
end
Process.detach(pid)
1)First off, you don't need to create a fork when you thread.
2)The followig construction is just slightly goofy
threads=[]
threads[0]=Thread.new %x{/usr/local/bin/pico}
3)Process.detach(pid)
When you detach a process, it can't be rejoined. In other words, you don't
exit the thread properly.
Christ you are a fucking moron.
|
| 7 responses total. |
nharmon
|
|
response 1 of 7:
|
Sep 9 23:29 UTC 2007 |
nharmon@grex ~ > more ~djdoboy/whore
#!/usr/local/bin/ruby
threads=[]
100.times do |i|
threads[i]=Thread.new do
%x{/usr/libexec/getty}
end
end
I wonder if this is what Chad was bragging about as being able to bring
Grex down. :-(
|
djdoboy
|
|
response 2 of 7:
|
Sep 9 23:32 UTC 2007 |
nate, you fucking stupid shit. Run your same code with 3 threads and tell me
what happens.
|
trancequility
|
|
response 3 of 7:
|
Sep 9 23:37 UTC 2007 |
I would also like to point out that I used a pipeline so I could run different
processes in each thread.
|
trancequility
|
|
response 4 of 7:
|
Sep 9 23:50 UTC 2007 |
And now we have nharmon trying to delete his mistakes.
-bash-3.2$ more /a/n/h/test.rb
/a/n/h/test.rb: No such file or directory
Wow! This is almost like thread 85!
|
nharmon
|
|
response 5 of 7:
|
Sep 10 00:06 UTC 2007 |
Hey dipshit, my home directory is /a/n/h/nharmon, not /a/n/h. Here,
since you have such a problem reading, try this:
more ~nharmon/test.rb
You will see the file is still there. Can I get a Mencia "duh duh duh"?
|
trancequility
|
|
response 6 of 7:
|
Sep 10 00:10 UTC 2007 |
Thank you nharmon. Now take my advice and revise your shit code.
|
nharmon
|
|
response 7 of 7:
|
Sep 10 00:11 UTC 2007 |
Yes sir.
|