[racket] Full command line arguments
Thank you all for all your answers!
Nikolaus' seem to be simple enough (Linux world for now):
(string-split (file->string "/proc/self/cmdline") "\u0000")
gives me what I want.
(FYI, the result of this in DrRacket is:
'("/usr/bin/gracket" "-N" "/usr/bin/drracket" "-J" "DrRacket" "-l-"
"drracket/drracket.rkt")
)
About sandboxes and custodians, this is also a nice and pure Racket
solution, but I'm a bit worried about the memory (and other?) overhead that
this might incur.
Is this doubt justified?
Laurent
On Wed, Jan 16, 2013 at 8:20 PM, Nikolaus Klepp <dr.klepp at gmx.at> wrote:
> Am Mittwoch, 16. Januar 2013 schrieb Tony Garnock-Jones:
> > On 01/15/2013 05:40 AM, Laurent wrote:
> > > The purpose is to be able to relaunch the process.
> >
> > Another approach might be to create an outer wrapper which builds a
> > nested namespace, custodian etc, within which your program is
> > dynamic-required.
> >
> > That way, you can signal to the wrapper to destroy the running custodian
> > and start afresh without having to exit or restart the unix process
> > itself. A little like servlet reloading.
> >
> > This would work cross-platform and in both DrRacket and Racket, I
> imagine.
> >
> > Regards,
> > Tony
> > ____________________
> > Racket Users list:
> > http://lists.racket-lang.org/users
>
> If you are on some unix-like OS you could use /proc/self/cmdline.
>
> Nik
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130116/464d3259/attachment-0001.html>