Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!linus!ramsdell
From: ramsdell@linus.UUCP
Newsgroups: comp.unix.wizards
Subject: POSIX execlfd and execvfd proposal
Message-ID: <18491@linus.UUCP>
Date: Mon, 30-Nov-87 08:24:35 EST
Article-I.D.: linus.18491
Posted: Mon Nov 30 08:24:35 1987
Date-Received: Wed, 2-Dec-87 03:36:03 EST
Reply-To: ramsdell@linus.UUCP (John D. Ramsdell)
Organization: The MITRE Corporation, Bedford MA
Lines: 30

In writing programs that dynamically load code, one usually needs to
know from which file the executing image was exec'ed.  I conclude from
my own review of Draft 12 of the POSIX standard (P1003.1), that there
is no way of knowing this information.  What do you think about adding
the following two system calls, execlfd and execvfd?

Synopsis

execlfd like execl

execvfd like execv

Description

These exec's replace the current process with a new image.  Before
replacing the image, but after determining the identity of the file to
be exec'ed, they open the binary image and place the file descriptor in
an external int called "boot_fd".  The exec fails if the open fails.

Thus when a C program is executed as result of these one of calls, it
is entered as a C procedure call as follows:

extern int boot_fd;
extern char **environ;
int main(argc, argv)
int argc;
char **argv;


John