
#9143: feature request: way to set actual program argv -------------------------------------+------------------------------------- Reporter: joeyhess | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.2 Resolution: | Keywords: Operating System: Linux | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by joeyhess): This stackoverflow answer gives a way to do it without ghc changes and without needing unusual linker options: http://stackoverflow.com/questions/26657699/how-to-change-the-name-of-a -haskell-process-under-linux Still, that seems quite a hack, maybe linux/glibc-specific also? I continue to feel that, since changing the name displayed by ps for a program is easy to accomplish in most any other language, and many unix programs use the ability to do so, it should also be made reasonably easy to do in haskell. Often, a program will want to change argv[0] but not the thread name. For example, ssh will set the argv[0] to various things like "sshd: joey" but leaves the thread name "sshd". So, an interface to prctl should be kept separate from an interface to argv[0]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9143#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler