9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dan Cross <cross@math.psu.edu>
To: 9fans@cse.psu.edu
Cc: 9trouble@plan9.bell-labs.com
Subject: [9fans] Oh, I almost forgot...
Date: Thu, 27 Feb 2003 12:08:36 -0500	[thread overview]
Message-ID: <200302271708.h1RH8aM21825@augusta.math.psu.edu> (raw)

In changing around newns(), I added a command to help in debugging.  It's
turned out to be fairly useful generally, and I've installed it as auth/newns.
Here's the source:

	- Dan C.

#include <u.h>
#include <libc.h>
#include <auth.h>

void
usage(void)
{
	fprint(2, "Usage: newns [ -f file ] command.\n");
	exits("usage");
}

void
main(int argc, char *argv[])
{
	char	*nsfile;

	nsfile = "/lib/namespace";
	ARGBEGIN {
	case 'f':
		nsfile = ARGF();
		break;
	default:
		usage();
		break;
	} ARGEND
	if (argc == 0)
		usage();
	newns(getuser(), nsfile);
	exec(argv[0], argv);
	sysfatal("exec: %s: %r", argv[0]);
}


                 reply	other threads:[~2003-02-27 17:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200302271708.h1RH8aM21825@augusta.math.psu.edu \
    --to=cross@math.psu.edu \
    --cc=9fans@cse.psu.edu \
    --cc=9trouble@plan9.bell-labs.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).