Timeline for Does running exec command preserves environment variables of the calling shell? If so, why?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 18 at 0:13 | answer | added | Simon Geard | timeline score: 0 | |
| Mar 26, 2023 at 5:33 | comment | added | Almaz Kharrasov | I don't know much the C lang. But does it come from your answer that the default behavior of the exec command that it passes environment variables of the calling shell to the command run, but doesn't do so for the local ones? | |
| Mar 26, 2023 at 5:30 | answer | added | user10489 | timeline score: 6 | |
| Mar 26, 2023 at 5:07 | comment | added | muru | The fork family of system calls have nothing to do with environment variables. It's in the exec family of system calls where environment variables are set. So instead of (paraphrasing) fork(); exec(something, args, env), you just have exec(something, args, env) when running exec something. | |
| S Mar 26, 2023 at 4:31 | review | First questions | |||
| Mar 26, 2023 at 6:52 | |||||
| S Mar 26, 2023 at 4:31 | history | asked | Almaz Kharrasov | CC BY-SA 4.0 |