Re: [patch 7/8] fdmap v2 - implement sys_socket2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux