Merge lp:~jamesodhunt/upstart/handle-no-home-var into lp:upstart
Proposed by
James Hunt
Status: | Rejected |
---|---|
Rejected by: | Dimitri John Ledkov |
Proposed branch: | lp:~jamesodhunt/upstart/handle-no-home-var |
Merge into: | lp:upstart |
Diff against target: |
110 lines (+46/-7) 3 files modified
ChangeLog (+7/-0) init/tests/test_xdg.c (+21/-3) init/xdg.c (+18/-4) |
To merge this branch: | bzr merge lp:~jamesodhunt/upstart/handle-no-home-var |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dimitri John Ledkov | Disapprove | ||
Review via email: mp+210621@code.launchpad.net |
Description of the change
Currently, if $HOME is unset and upstart is run as a Session Init, it will spin at 100% CPU,due to the following in main():
592 dirs = NIH_MUST (get_user_
We could just change that logic, but a better approach is to query the password database to determine the users home directory as that is a more reliable method anyway.
To post a comment you must log in.
Unmerged revisions
- 1612. By James Hunt
-
* init/xdg.c: get_home_subdir() Try harder to establish users home
directory to handle environments where $HOME may not be set.
* init/tests/test_xdg. c: Updated tests based on new safer behaviour of
get_home_subdir( ).
user-session init shouldn't be started without $HOME set in the environment. getpwent call can block on looking up NIS/ldap, and the expectation is that by the time upstart --user is run $HOME is properly available.
upstart as PID 2 shoudn't be running with --user flag, as we don't want /root/. config/ upstart config dir nor logs in /root/. cache/upstart. We want it to read /etc/init and log into /var/log/upstart.