[racket] Can raco exe assign a name other than "racket"?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Apr 3 17:29:01 EDT 2011

At Sun, 03 Apr 2011 23:22:14 +0200, Jakub Piotr Cłapa wrote:
> On 29.03.11 19:03, Matthew Flatt wrote:
> > At Mon, 28 Mar 2011 07:28:54 -0600, Matthew Flatt wrote:
> >> To change the name shown by `ps', it looks like Racket could call
> >> prctl() with PR_SET_NAME --- at least for Linux (2.6.9 and up). I'll
> >> look into that more.
> >
> > I've pushed that change. Racket sets the process name to match the -N
> > argument if supplied, otherwise it sets the name to match argv[0].
> >
> > The latter makes `raco exe'-produced executables have the expected
> > name, and the former makes `drracket' start a process with the name
> > `drracket' (instead of `gracket').
> 
> And from what place does Linux get the process name if not from argv[0]? 
> ELF headers?

I think it uses the executable path supplied to execve(), which is
separate from argv[0].




Posted on the users mailing list.