Skip to content

Commit

Permalink
Change initialization to prevent crash, NEMO#604
Browse files Browse the repository at this point in the history
Move init_kernel_notification() to happen before
init_first_boot_hwclock_time_adjustment_check().

If the file /var/cache/timed/first-boot-hwclock.dat
is missing, then timed tries to set the system time in
init_first_boot_hwclock_time_adjustment_check().

The function tries to stop kernel time change
monitoring, which caused timed to segfault as
the object responsible for monitoring time change
was created in init_kernel_notification(), which
was called after
init_first_boot_hwclock_time_adjustment_check().
  • Loading branch information
Petri M. Gerdt committed Jan 15, 2013
1 parent b38e9a2 commit b52736e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/timed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ Timed::Timed(int ac, char **av) :
init_session_bus() ;
log_debug() ;

init_kernel_notification();

init_first_boot_hwclock_time_adjustment_check();
log_debug() ;

Expand Down Expand Up @@ -178,8 +180,6 @@ Timed::Timed(int ac, char **av) :
init_apply_tz_settings() ;
log_debug() ;

init_kernel_notification() ;

log_info("daemon is up and running") ;
}

Expand Down

0 comments on commit b52736e

Please sign in to comment.