Talk:Exec (computing)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated B-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
B-Class article B  This article has been rated as B-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.

Translation mode and further questions[edit]

  • The exec calls do not preserve the translation modes of open files.
  • The article currently talks about the return value of the exec* functions. Shouldn't it say exit status instead? Or can we say: from the perspective of the exiting process an exit status is returned, while from the parent process this looks like a return value?
  • [With some exec* commands] the child process inherits the parent's environment.
    • Is it correct to speak of parent and child in the context of exec? With the fork command, we get two distinct processes, one being called parent and one being called child. But with exec, the process "creating the child" will be the child itself - the parent does not exist anymore (put in another way: the parent transforms to a child). So I feel it is a misnomer to talk about parent and child in exec contexts, especially when one considers that there usually (always?) is a parent to the process that executes the exec command. Maybe an expert can clarify the nomenclature?

Thanks, --Abdull (talk) 09:52, 25 July 2008 (UTC)

  • I’m guessing translation mode refers to the DOS and Windows text-mode CRLF newline translation. In fact it looks like that text is copied straight from the exec functions entry in Microsoft’s MSDN. Probably not even worth mentioning in the article.
  • The return value of the function call is only relevant if it fails to replace the process. I’ll try and make that clearer.
  • Yes it is better to talk about the new and old processes with exec, rather than parent and child, I think. Somebody must have already fixed this.

Vadmium (talk) 08:47, 6 August 2011 (UTC).

Disputed - new process inheriting parent's settings when envp is null[edit]

The entry states the following: If envp itself is null, the new process inherits the current environment settings.

This is not true on a variety of systems (Linux comes to mind), and this can be trivially demonstrated. Furthermore, every POSIX/*nix source I've searched with regards to the exec family of functions (including,, Steven's Advanced Programming in the UNIX Environment, and Mauerer's Professional Linux Kernel Architecture) does not mention that type of behavior.

If there are systems whose implementation of exec does just that, they should be listed (with a caveat that this is no the typical behavior.) — Preceding unsigned comment added by Luis.a.espinal (talkcontribs) 13:49, 8 January 2013 (UTC)