0

Simple question, if I clone a thread, and I have open file descriptors set up to generate SIGIO signals, and keep the same descriptor tables, what happens when in relations to signals after the clone? Do they just go the original thread, or does something less obvious happen?

Also, I am using clone to implement threads (I want to write my own threading functions/libraries), are there any other pitfalls or anything that I should be aware? Feel free to just link to other posts that you think I should look at.

I haven't had any luck finding any good quality article on implementing threads using clone, so would appreciate know where any good info is generally.

jatos
  • 31
  • 4
  • 1
    see [this SO question](http://stackoverflow.com/questions/13283294/how-to-make-thread-in-c-without-using-posix-library-pthread-h/13286454) – didierc Nov 18 '12 at 21:55
  • Why do you want to implement your own threading library? If you really do want that, you'll need to understand `futex(7)` in great detail, and to code some assembler code. I'll suggest at least to carefully study existing implementations, such as http://www.musl-libc.org/ – Basile Starynkevitch Nov 18 '12 at 21:55
  • Quite simply, I like to know exactly what my code is doing as far as possible, I am somewhat of a control freak! To the extent where I use to want to only write DOS code because using other peoples APIs was too much like relying on what someone else had wrote! In any case, thanks for that, saves me more messing about in a mountain of documentation trying to zero in on what I actually need to know... – jatos Nov 18 '12 at 23:34

0 Answers0