Re: [Scheme-reports] command-line Noah Lavine (04 Apr 2012 19:13 UTC)
Re: [Scheme-reports] command-line Aaron W. Hsu (04 Apr 2012 19:19 UTC)
Re: [Scheme-reports] command-line Alex Shinn (04 Apr 2012 23:25 UTC)
Re: [Scheme-reports] command-line Emmanuel Medernach (06 Apr 2012 06:48 UTC)
Re: [Scheme-reports] command-line Aleksej Saushev (08 Apr 2012 18:52 UTC)
Re: [Scheme-reports] command-line Emmanuel Medernach (09 Apr 2012 07:43 UTC)

Re: [Scheme-reports] command-line Aleksej Saushev 08 Apr 2012 17:35 UTC

Emmanuel Medernach <emmanuel.medernach@gmail.com> writes:

> On Wed, Apr 4, 2012 at 9:18 PM, Aaron W. Hsu <arcfide@sacrideo.us> wrote:
>
>     I know that you can get the argv[0] from the environment, but without
>     being tied somehow to the program execution, it is not apparent to me
>     whether COMMAND-LINE even makes sense.  That is, I am imagining an
>     embedded Scheme that runs as the scripting language of some other
>     application. Here one might not have explicit access to the argv
>     structure, but then would it even make senses to populate the
>     COMMAND-LINE with anything?
>
>  Is the unreliability of /proc/self/cmdline really a problem ?

Not at all. :)

lithium$ ls /proc
lithium$

> AFAK, "ps" uses /proc/<pid>/cmdline to access the command line
> arguments of processes.

No, you're wrong, it uses libkvm.

>  If you need arguments, you may provide a "<your scheme>-init" function like this for instance:
>  (define (<your scheme>-init . args) ...)
>
>  which let your users to arbitrarily fill the command line passed to your underlying Scheme.
>  I don't know if other people agree with this. But again, you are free not to implement the "process-context" library.

--
HE CE3OH...

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports