Is it possible to access the original argv pointer from Haskell main ?
My use case is that I want to remove command line options after starting the application so that they cannot be read via ps . There are several ways to do this, but all require manipulating the original argv .
I can do this if I write a C wrapper and call hs_init from there (after that using argv ala here ), but it's Better to do it from Haskell.
Thanks!
PS - this question is different from duplicate , because the duplicate uses prctl , which, as far as I can tell, allows you to change the name of the process. In addition, the duplicate is looking to "install" argv[0] , while I'm trying to get a mutable link to the original argv , used to invoke a program.
source share