- log(INFO, "Serializing state and re-execing...");
- CubemapStateProto state = collect_state(
- serialize_start, acceptors, inputs, servers);
- string serialized;
- state.SerializeToString(&serialized);
- state_fd = make_tempfile(serialized);
- if (state_fd == -1) {
- exit(1);
+ CubemapStateProto state;
+ if (stopped) {
+ log(INFO, "Shutting down.");
+ } else {
+ log(INFO, "Serializing state and re-execing...");
+ state = collect_state(
+ serialize_start, acceptors, inputs, servers);
+ string serialized;
+ state.SerializeToString(&serialized);
+ state_fd = make_tempfile(serialized);
+ if (state_fd == -1) {
+ exit(1);
+ }