~mir-team/mir/uniformity-measurement

« back to all changes in this revision

Viewing changes to benchmarks/frame-uniformity/touch_measuring_client.cpp

  • Committer: Robert Carr
  • Date: 2014-10-09 21:13:20 UTC
  • Revision ID: robert.carr@canonical.com-20141009211320-3lk4myz9qh4trmpk
Set null lifecycle callback to avoid being sighupped

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
{
121
121
}
122
122
 
 
123
namespace
 
124
{
 
125
void null_lifecycle_callback(MirConnection*, MirLifecycleState, void*)
 
126
{
 
127
}
 
128
}
 
129
 
123
130
void TouchMeasuringClient::run(std::string const& connect_string)
124
131
{
125
132
    auto connection = mir_connect_sync(connect_string.c_str(), "frame-uniformity-test");
126
133
    assert(mir_connection_is_valid(connection));
127
134
    
 
135
    /*
 
136
     * Set a null callback to avoid killing the process
 
137
     * (default callback raises SIGHUP).
 
138
     */
 
139
    mir_connection_set_lifecycle_event_callback(connection, null_lifecycle_callback, nullptr);
 
140
    
128
141
    auto surface = create_surface(connection);
129
142
 
130
143
    collect_input_and_frame_timing(surface, client_ready, touch_duration, results);