Timeline for PID of the background function, F, in commands invoked in subshells inside F
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 29, 2018 at 9:42 | comment | added | Kusalananda♦ | @Harry Yes, of course, if you wish to do it that way. However, that would also set it in foo and in whatever environment foo is executing in. In this case, you are running foo as a background job, so it doesn't affect the other foos or the main script. | |
| Jul 29, 2018 at 9:26 | comment | added | Harry | Then, can't we just export it from within foo so that ALL calls to functions or programs/scripts from within foo automatically get it, instead of I passing it explicitly every time? | |
| Jul 29, 2018 at 9:13 | comment | added | Kusalananda♦ | @Harry It allows for the case where bar is a script or other application (not a function). | |
| Jul 29, 2018 at 9:11 | vote | accept | Harry | ||
| Jul 29, 2018 at 4:46 | comment | added | Harry | The bashpid approach should work for me. But if bashpid is the local/dynamic scope of foo, why are you passing it as an env var when calling bar? | |
| Jul 29, 2018 at 4:15 | vote | accept | Harry | ||
| Jul 29, 2018 at 4:15 | |||||
| Jul 27, 2018 at 9:55 | history | edited | Kusalananda♦ | CC BY-SA 4.0 | added 171 characters in body |
| Jul 27, 2018 at 9:35 | history | edited | Kusalananda♦ | CC BY-SA 4.0 | added 71 characters in body |
| Jul 27, 2018 at 9:28 | history | answered | Kusalananda♦ | CC BY-SA 4.0 |