I'm not merely experimenting with kqueue because I like the shiny bells and whistles. I want to know how fast a mirror will download the same file from different mirrors. ftp() is shitty for expediency. It does one of three things it fails fast, succeeds fast, or it could take FOREVERRRRRR!!! I want to detect all three of these scenarios and stop it if it takes forever. So I call kqueue to time how long it takes ftp to run. If it takes too long, I kill it. I don't know of any other calls that can do this other than kqueue. And in a fresh install with absolutely no packages, I think the only way to do it is by using C.
-Luke On Fri, Jan 29, 2016 at 6:44 AM, Jérémie Courrèges-Anglas <j...@wxcvbn.org> wrote: > Luke Small <lukensm...@gmail.com> writes: > > > I wanted to use kqueue. Name another script or programming language that > > offers it from the base install. NONE! > > If you want to discover how to use kqueue, fine, but that's not how > design decisions are done in OpenBSD land. > > > Why should I write it in another language. I already did it in C. Is > there > > another way other than kqueue that you can wait for the ftp call to quit, > > while being able to kill it if it takes too long? > > Yes, there are other ways. There are also ways that don't involve > ftp(1), sed(1) and uname(1). > > Luke, sorry if it sounds blunt but your code is just not good enough to > be accepted into base. You've probably learned some things when writing > this program, and maybe it fits your use case, but that's all. > > Aside from that I've never felt the need for such kind of program, and > I don't feel like there's much demand from others. > > Cheers, > -- > jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE >