[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] command-line



Emmanuel Medernach <emmanuel.medernach@x> writes:

> On Wed, Apr 4, 2012 at 9:18 PM, Aaron W. Hsu <arcfide@x> 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@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports