Version française
Home     About     Download     Resources     Contact us    
Browse thread
Writing to argv[0]
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dave Benjamin <dave@r...>
Subject: Re: [Caml-list] Writing to argv[0]
Basile STARYNKEVITCH wrote:
> Dave Benjamin wrote:
>> Hi,
>>
>> Is there any way for an OCaml program to change its name in the 
>> process table? Assigning to Sys.argv.(0) has no effect.
> 
> 
> Write a C wrapper for that. And this trick seems Linux specific (it has 
> no sense in Posix) -maybe working on few other OSes.

It doesn't seem like it's possible, even if I drop to C. Writing to 
"caml_exe_name" does nothing, and "caml_main_argv" is declared static.

Oh well - judging from what I've read, it seems this technique has 
always been somewhat of a hack anyway...

Thanks,
Dave