Posts

Showing posts with the label session init

Stateful re-exec for Upstart Sessions? You bet!

As of  Upstart 1.6 , restarting PID 1 is supported without losing state. So as soon as you get an update to either Upstart itself or one of its dependent libraries in Ubuntu, you'll be running the new version automatically, without the need for a reboot. But what about User Sessions ? Are they "second-class citizens"? Of course not! When PID 1 restarts, all the running Session Inits will automatically restart too . You won't notice this of course as your desktop session will continue to run and be fully functional but you too will be running the latest version of Upstart. How does this work? When an instance of Upstart has restarted, it signals this fact over D-Bus. From the user perspective, the upstart-event-bridge , listening to the system instance of Upstart running as PID 1, will generate a " :sys:restarted " event when it detects the restart. This in turn will cause the session job  /usr/share/upstart/sessions/re-exec.conf  to run. And that job re...

Upstart User Sessions in Ubuntu Raring

Image
Overview Ubuntu Raring now includes Upstart 1.8 . Upstart 1.7 and 1.8 combined mark a major milestone since they bring the proven power of Upstart to the user as never before: not only is Upstart now managing the system, but it is also capable of managing the default Ubuntu user's desktop sessions too. Why? Question:  Why reuse a system facility at the user level in this way? The modern Linux desktop environment is a very dynamic one: users start and stop applications, switch workspaces, search the dash, adjust personal settings in the panel, connect to different networks, hot-plug USB devices and so on. All of these activities can be represented by "events". Stepping back a second, recall that Upstart was written  from the outset  to take advantage of  the dynamic nature of a modern Linux system . Long gone are the days when a system booted serially. A modern Linux system abounds with "events" from all sorts of different sources: The user plugs or ...