LWN.net Logo

Stupid question - that Linus anticipated

Stupid question - that Linus anticipated

Posted Feb 17, 2007 2:05 UTC (Sat) by ds2horner (subscriber, #13438)
In reply to: Stupid question by spitzak
Parent article: Alternatives to fibrils

In his explanation it was so that the fork code could be reused with no modifications. He implies it could be done if it matters to callers.

Linus:
Now, I agree that this is a bit ugly in some of the details: in
particular, it means that if the system call blocks, we will literally
return as a *different* thread to user space. If you care, you shouldn't
use this interface, or come up with some way to make it work nicely (doing
it this way meant that I could just re-use all the clone/fork code as-is).


(Log in to post comments)

Stupid question - that Linus anticipated

Posted Feb 20, 2007 0:28 UTC (Tue) by mikov (subscriber, #33179) [Link]

How could it _not_ matter to callers ? If the thread id can change arbitrarily based on factors outside of the applications control - e.g. if some driver buffer is empty - then the thread id becomes completely pointless.

To me this seems completely unacceptable. Am I missing something ?

Stupid question - that Linus anticipated

Posted Feb 22, 2007 21:02 UTC (Thu) by huaz (guest, #10168) [Link]

You are right, it's indeed unacceptable.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds