07-09-07 06:17 AM
"Ravi" <ra.ravi.rav@gmail.com> wrote in message
news:1183909977.157322.265560@c77g2000hse.googlegroups.com...
> int execl(const char *path, const char *arg, ...); The first
> argument, by convention, should point to the filename associated with
> the file being executed.
> Why? whats the significance of this?
It is unclear where you got this prose from (my "man" doesn't say it like
this). Two potential points of relevance:
a)For execl(), I believe a path has to be specified (otherwise, what would
you load?), AND
b)It is very common in *nix systems to symlink/hardlink/duplicate a bunch of
programs that are actually the same executable image but are just given
different names. The program then makes decisions about its behavior based
on what name it is invoked under.
This is most commonly done either for programs with different names but
identical functionality or different names but related functionality. For
example, on my Linux system, I think but am not sure that "poweroff",
"halt", and "reboot" are the same program file. But it tailors its behavior
based on what name it is invoked under.
--
David T. Ashley (dta@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)
[ Post a follow-up to this message ]
|