apol added inline comments.
INLINE COMMENTS
> kcrash.cpp:823
> +char** environ_end;
> +for(environ_end = environ; *environ_end; ++environ_end);
> +
Use {} instead of ; for readability.
REPOSITORY
R285 KCrash
REVISION DETAIL
https://phabricator.kde.org/D29810
To: jpalecek, #framewo
jpalecek added inline comments.
INLINE COMMENTS
> anthonyfieroni wrote in kcrash.cpp:825
> Just use vector, get the size by `environ_end - environ`
No, that would be dynamic allocation, which is not safe in signal handlers. The
whole purpose was to avoid it.
REPOSITORY
R285 KCrash
REVISION
anthonyfieroni added inline comments.
INLINE COMMENTS
> kcrash.cpp:825
> +
> +std::array environ_data; //hope it's big enough
> +if((unsigned)(environ_end - environ) +2 >= environ_data.size()) {
Just use vector, get the size by `environ_end - environ`
REPOSITORY
R285 KCrash
REVISION
jpalecek retitled this revision from "t/dont-use-setenv-after-fork" to "Don't
use setenv after fork".
jpalecek edited the summary of this revision.
REPOSITORY
R285 KCrash
REVISION DETAIL
https://phabricator.kde.org/D29810
To: jpalecek, #frameworks
Cc: kde-frameworks-devel, LeGast00n, cblack