• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to hide command line passed to my own tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to hide command line passed to my own tool


  • Subject: How to hide command line passed to my own tool
  • From: Martin Bestmann <email@hidden>
  • Date: Wed, 29 Sep 2004 20:35:55 +0200

Hi,

I'm writing a command line tool. When I call this tool from my app I like to hide those parameters so that ps or other tools like this can not see them.
I tried the following code


for (int i=1; i<argc; i++) {
		char *arg = argv[i];
		while(*arg)
			*arg++ = "#";
	}

Set my my argument to something unreadable but this doesn't help. I still see the parameters when I do a ps.

Is there any way to do this on darwin?

Thanks,

Martin
------------------------------------------------------------------------ -----------------------
Martin Bestmann Netopia Development GmbH
Phone: +49-9134-9942-0 Weingasse 26
Fax: +49-9134-997911 91077 Neunkirchen am Brand
e-mail:email@hidden Germany



_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: How to hide command line passed to my own tool
      • From: email@hidden (Peter Seebach)
  • Prev by Date: Re: Thermal scheduling
  • Next by Date: Re: How to hide command line passed to my own tool
  • Previous by thread: ipfw Divert Sockets and PPTP
  • Next by thread: Re: How to hide command line passed to my own tool
  • Index(es):
    • Date
    • Thread