lkml.org 
[lkml]   [2007]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 7/8] fdmap v2 - implement sys_socket2


On Sun, 10 Jun 2007, Eric Dumazet wrote:

> Linus Torvalds a écrit :
> >
> > close(0);
> > close(1);
> > close(2);
> > .. generate filenames, whatever ..
> > if (open(..) < 0 || open(..) < 0 || open(..) < 0)
> > die("Couldn't redirect stdin/stdout/stderr");
> >
> > and there's absolutely nothing wrong with this kind of setup, even if you
> > could obviously have done it other ways too (ie by using "dup2()" instead of
> > "close + open"),
>
> This kind of setup was OK 25 years ago, before multithreading era.
> You cannot reasonably expect it to work in a multithreaded program.

Who said _anything_ about threading?

The above is a totally non-threaded app. 99% of all applications are like
that.

Threading is for the 1%. But 99% is what we need to make sure works.

Linus
\
 
 \ /
  Last update: 2007-06-10 20:27    [W:0.129 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site