This is an archive of the discontinued LLVM Phabricator instance.

Correct environ parsing on NetBSD
ClosedPublic

Authored by krytarowski on Apr 6 2017, 1:13 PM.

Details

Summary

This replaces old code in Host::GetEnvironment for NetBSD
with the version from Linux. This makes parsing environment
variables correctly. It also fixes programs that depend on the
variables like curses(3) applications.

Long term this function should be moved to Process Plugin,
as currently env variables are not available with remote
debugging.

Other BSDs might want to catch up after this change.

Tested with NetBSD top(1).

Sponsored by <The NetBSD Foundation>

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Apr 6 2017, 1:13 PM
emaste accepted this revision.Apr 7 2017, 9:24 AM
This revision is now accepted and ready to land.Apr 7 2017, 9:24 AM
emaste added a comment.Apr 7 2017, 9:26 AM

For freebsd/Host.cpp I will also move Host::GetEnvironment near the end of the file (in the same place as linux/Host.cpp).

krytarowski closed this revision.Apr 7 2017, 9:58 AM