It's generally a bad idea to try to improve security by hiding args. Much better to pass the argument another way, for instance via an open file descriptor that the program reads the value from.
Hi, all
I wonder is there a way to hide command line arguments from programs like “ps”? I can rewrite argv parameter for main in c language, or use LD_PRELOAD to intercept libc_start_main, but all these methods do not be functional in go. Thanks.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Environment variables. github.com/namsral/flag implements a flags library that will populate flags from either command line args or environment variables at run time, and is a drop-in replacement for the standard flag library.
--- SER