Strings as function names (again)

Blair P. Houghton bhoughto at pima.intel.com
Mon Feb 11 08:42:22 AEST 1991


gwyn at smoke.brl.mil (Doug Gwyn) writes:
>One is that you have to tell it a path to the executable file, and
>that is not in general available for the currently-executing process.

wolfram at ikki.informatik.rwth-aachen.de (Wolfram Roesler) writes:
>Sure? How about argv[0] ?

In article <596 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
>How about it?  In an ANSI-conforming implementation (2.1.2.2.1):
>a.  argc may be 0, and argv a null pointer.
>b.  argv[0] may point to a null character.
>c.  argv[0] may contain the program name with no path information.

d.  argv[0] may contain grot.

e.g., `execl("/bin/sh","my dog has fleas","-c","/bin/echo $0",0);'
(using execl(3) under Ultrix).

				--Blair
				  "my dog has fleas"



More information about the Comp.lang.c mailing list