lkml.org 
[lkml]   [2001]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Makefile gcc -o /dev/null: the dissapearing of /dev/null
On Sat, 29 Sep 2001, Jan-Benedict Glaw wrote:

> On Sat, 2001-09-29 09:55:35 +0200, proton <proton@energymech.net>
> wrote in message <3BB57E77.4CDFF5D0@energymech.net>:
>
> > Ofcourse, you cant unlink /dev/null unless you are root.
>
> That's right and fine so far.
>
> > In any case, the `gcc -o /dev/null' test cases probably
> > need to go away.
>
> No. Why? Well, the Linux kernel compiles just fine while
> being an ordianary user. You don't have to be root to
> compile it. As it's just bad to do usual *work* as root,
> you're the bug.

So then you can no longer 'make modules && make modules_install', or you
have to cp or chown /usr/src/linux on a fresh install to compile your
kernel? Doesn't sound pleasant to me.

I think the "trick" is to redirect stdout and stderr to /dev/null as well,
so that /dev/null doesn't get removed from the file system since it is
held open by the shell.

Something like:

gcc -o /dev/null -xc /dev/null /dev/null 2>&1

Perhaps someone just forgot the I/O redirection in one of the tests?

However, I just compiled (but did not install) 2.4.10, as root, and my
/dev/null still exists...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site