Browse thread
Writing to argv[0]
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2008-10-10 (20:19) |
From: | Dave Benjamin <dave@r...> |
Subject: | Re: [Caml-list] Writing to argv[0] |
On Fri, 10 Oct 2008, Richard Jones wrote: > On Fri, Oct 10, 2008 at 09:33:17AM -0700, Dave Benjamin wrote: >> >> Thanks, Rich - this looks very comprehensive - they even go out of their >> way to support Windows! =) However, unless I'm mistaken, I still have the >> problem of not being able to access "argc" and "argv" to pass into >> save_ps_display_args(). I suppose I could embed OCaml in a C program... > > Yes, it was intended more as a joke rather than a serious suggestion :-) I'm starting to wonder if this all isn't one big joke that went over my head. =) > I was also talking to Jim Meyering about the possibility of adding > this code to gnulib[1] which would make it more widely available to > all programs. Yeah, it would be really nice to get a safe version of this feature packaged up somewhere that could be installed easily. If you search the web for "libproctitle" you'll find a library by Dmitry V. Levin which it looks like he was trying to get into Debian earlier this year. I couldn't find it in unstable, though. There are RPMs available here: http://sisyphus.ru/srpm/Sisyphus/setproctitle/get That Perl module also has the low-level stuff broken out into a C library, though it doesn't appear like any attempt was made to release it independently: http://search.cpan.org/src/OPI/Sys-Proctitle-0.03/libsetproctitle/ Hmm. Maybe it's time to replace "ps" with something more modern... this is all so dirty, yet it seems like monitoring process status is still a useful thing to be able to do, especially with the proliferation of multi-process servers. Dave