[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [racket] Can raco exe assign a name other than "racket"?
From:       greghendershott () gmail ! com (Greg Hendershott)
Date:       2011-03-30 1:22:30
Message-ID: AANLkTinJELBt9hQZBvQb4t+BUuQif+6-om2vMdpjxx22 () mail ! gmail ! com
[Download RAW message or body]

Thank you Matthew for the change. And thank you Eli for cluing me in
that ps auxw is the magic spell to see the fuller/wider-than-"-Fw",
truly untruncated command line.

On Tue, Mar 29, 2011 at 3:32 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Tue, 29 Mar 2011 14:51:13 -0400, Eli Barzilay wrote:
>> Two hours ago, 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').
>>
>> I'm still seeing this from `ps auxw':
>>
>> ? eli ? ? ?23017 44.0 ?3.2 451000 130804 pts/5 ? Rl+ ?14:48 ? 0:01
>> /home/eli/src/plt/bin/gracket -N ../../bin/drracket -l- drracket/dr
>>
>> wasn't that suppose to change?
>
> No. In Linux, each process has a name and a command line. The default
> `ps' mode shows names, but BSD mode (among others) shows command lines.
> The prctl() change sets only the name.
>
> It looks like the command line can be changed in Linux by overwriting
> the space used by the current command-line arguments. I'm not sure
> that's a good idea, partly due to the way a command-line would have to
> be synthesized, and partly because the actual command-line already has
> distinguishing information, but I can look into it more.
>
> _________________________________________________
> ?For list-related administrative tasks:
> ?http://lists.racket-lang.org/listinfo/users
>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic