<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c">File src/exec.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@64">Patch Set #2, Line 64:</a> <code style="font-family:monospace,monospace">/*! generate a filtered version of the process environment containing only entries of whitelisted keys.</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Worth mentioning that strings in our are shared from in, ie strings are not copied.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@67">Patch Set #2, Line 67:</a> <code style="font-family:monospace,monospace"> *  \param[in] in input environment (NULL-terminated list of pointers like **environment)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">worth mentioning where does this **environment come from.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@116">Patch Set #2, Line 116:</a> <code style="font-family:monospace,monospace">int osmo_environment_append(char **out, size_t out_len, char **in)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Not sure if appending an already existing key to the list makes it really overwrite it. It could be process expects keys not to be duplicated and hence takes first one it finds?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@124">Patch Set #2, Line 124:</a> <code style="font-family:monospace,monospace">     for (out_used = 0; out[out_used]; out_used++) {}</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">for (out_used = 0; out[out_used]; out_used++);</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@169">Patch Set #2, Line 169:</a> <code style="font-family:monospace,monospace">extern char **environ;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">unistd.h:</p><p style="white-space: pre-wrap; word-wrap: break-word;">/* NULL-terminated array of "NAME=VALUE" environment variables.  */<br>extern char **__environ;<br>#ifdef __USE_GNU<br>extern char **environ;<br>#endif</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@172">Patch Set #2, Line 172:</a> <code style="font-family:monospace,monospace">int osmo_system_nowait(const char *command, char **addl_env)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">addl_env? Please document the params.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/16619">change 16619</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/16619"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ib24ac8a083db32e55402ce496a5eabd8749cc888 </div>
<div style="display:none"> Gerrit-Change-Number: 16619 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 17 Dec 2019 10:21:11 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>