Change in libosmocore[master]: Introduce helper functions for safe fork+exec of processes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Dec 17 10:21:11 UTC 2019


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16619 )

Change subject: Introduce helper functions for safe fork+exec of processes
......................................................................


Patch Set 2:

(6 comments)

https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c 
File src/exec.c:

https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@64 
PS2, Line 64: /*! generate a filtered version of the process environment containing only entries of whitelisted keys.
Worth mentioning that strings in our are shared from in, ie strings are not copied.


https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@67 
PS2, Line 67:  *  \param[in] in input environment (NULL-terminated list of pointers like **environment)
worth mentioning where does this **environment come from.


https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@116 
PS2, Line 116: int osmo_environment_append(char **out, size_t out_len, char **in)
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?


https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@124 
PS2, Line 124: 	for (out_used = 0; out[out_used]; out_used++) {}
for (out_used = 0; out[out_used]; out_used++);


https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@169 
PS2, Line 169: extern char **environ;
unistd.h:

/* NULL-terminated array of "NAME=VALUE" environment variables.  */
extern char **__environ;
#ifdef __USE_GNU
extern char **environ;
#endif


https://gerrit.osmocom.org/c/libosmocore/+/16619/2/src/exec.c@172 
PS2, Line 172: int osmo_system_nowait(const char *command, char **addl_env)
addl_env? Please document the params.



-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16619
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib24ac8a083db32e55402ce496a5eabd8749cc888
Gerrit-Change-Number: 16619
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 17 Dec 2019 10:21:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191217/93d2bddd/attachment.htm>


More information about the gerrit-log mailing list