On Fri, Aug 26, 2011 at 5:24 PM, Nils Andresen <n...@nils-andresen.de> wrote:
> 2011/8/26 Mike Gilbert <floppymas...@gmail.com>:
>> Why not just use argv[0]?
>
> Hmm. I am mainly a c# programmer trying to get my bearings around c
> but I was under the impression that in c (as in c#) you don't get the
> clients name in the args.
> Or are you suggesting to push the clients name in the args? I.e.
> expecting the client to alter argv, so that argv[0] always contains
> the name?
>

In C, argv[0] normally contains the name of the program being run, as
the user gave it on the command line. So, if the user runs
"/usr/bin/xfreerdp -a 32 ...", you get the following:

argv[0] = "/usr/bin/xfreerdp"
argv[1] = "-a"
argv[2] = "32"
...

On Linux, it is technically possible to pass any arbitrary string in
argv[0] since exec takes the path to the program as a separate
argument. However, the user would have to go out of their way to do
that.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to