Fix setproctitle on Linux.
The former code used to assume that argv and envp fit in a memory page, but it is not true (at least today), causing setproctitle to fail randomly and silently. This patch rewrites setproctitle to remove the memory page assumption entirely. Instead it now writes the process title up to the end of envp after saving envp storage. BUG=chromium:1044502 TEST=set_process_title_linux_unittests # on Linux 3.{0..19}, 4.{0..20}, 5.{0..5} TEST=Build and run Chrome OS Chrome and see ps output Change-Id: Ie2f060a38b3e5003155ef8e5788855761e229776 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2026772Reviewed-by:Scott Violet <sky@chromium.org> Reviewed-by:
Thomas Anderson <thomasanderson@chromium.org> Reviewed-by:
Ken Rockot <rockot@google.com> Reviewed-by:
Jorge Lucangeli Obes <jorgelo@chromium.org> Commit-Queue: Shuhei Takahashi <nya@chromium.org> Cr-Commit-Position: refs/heads/master@{#752356}
Showing
Please register or sign in to comment