All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-kernel@vger.kernel.org
Subject: Re: Makefile gcc -o /dev/null: the dissapearing of /dev/null
Date: Sat, 29 Sep 2001 20:21:48 +0200	[thread overview]
Message-ID: <20010929202148.D26521@lug-owl.de> (raw)
In-Reply-To: <20010929114304.A21440@lug-owl.de> <Pine.LNX.4.33.0109290535390.25966-100000@cerberus.stardot-tech.com>
In-Reply-To: <Pine.LNX.4.33.0109290535390.25966-100000@cerberus.stardot-tech.com>

On Sat, 2001-09-29 06:10:52 -0700, Jim Treadway <jim@stardot-tech.com>
wrote in message <Pine.LNX.4.33.0109290535390.25966-100000@cerberus.stardot-tech.com>:
> 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.

You may do it this way:

make dep clean bzImage modules && su -c "make modules_install"

This is so far the minimal version for building as non-root user.

> 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

No-go. It's perfectly okay to remove an opened file. Test it yourself.
You may even replace a running (!) executable...

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

No. It would be of no effect:-)

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

Fine:-) That's the way to go!

MfG, JBG

-- 
Jan-Benedict Glaw . jbglaw@lug-owl.de . +49-172-7608481

  reply	other threads:[~2001-09-29 18:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-29  7:55 Makefile gcc -o /dev/null: the dissapearing of /dev/null proton
2001-09-29  9:43 ` Jan-Benedict Glaw
2001-09-29 13:10   ` Jim Treadway
2001-09-29 18:21     ` Jan-Benedict Glaw [this message]
2001-09-30  3:03       ` Jim Treadway
2001-10-01 14:46       ` Rob Landley
2001-09-29 18:36     ` J.H.M. Dassen (Ray)
2001-09-30 14:24     ` Olaf Titz
2001-09-30 23:47       ` Jim Treadway

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010929202148.D26521@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.