5 ms·
For level 06, I came up with a completely different solution. After hitting my head against the wall all day trying to fight with blocking/non-blocking IO, I re
by mpetrov 15y ago
For level 06, I came up with a completely different solution. After hitting my head against the wall all day trying to fight with blocking/non-blocking IO, I resorted to a timing attack on the system call which worked really well. Check it out:
https://gist.github.com/1899389 https://gist.github.com/1899389 (SPOILERS!)
- zx2c4 15y agoThat's neat. Timing. Awesome. I made mine a bit more reliable and made a movie. Source: http://pastebin.com/6M4cq8gB http://pastebin.com/6M4cq8gB Video: http://www.youtube.com/watch?v=_q2wTd1jgUQ http://www.youtube.com/watch?v=_q2wTd1jgUQ
- benmmurphy 15y agoi did it a different way to both of you but similar to zx2c4 's :) i found a way to block the child process from writing to stderr. i thought the way they were writing to stderr/ stdout was too much of a coincidence. all stdout writes end with \n
- zx2c4 15y agoWadja end up doin'? Source?
- benmmurphy 15y agohttps://gist.github.com/1914845 https://gist.github.com/1914845
- vd83 15y agoI had the same solution, just different heuristics.. http://pastebin.com/VfdmgwSA http://pastebin.com/VfdmgwSA