~diwic/ubuntu/lucid/pulseaudio/bugfixes

« back to all changes in this revision

Viewing changes to src/daemon/cpulimit.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2007-12-04 00:56:08 UTC
  • mto: (1.15.1 sid)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20071204005608-3lzrrrpxi186kgx4
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: cpulimit.c 1971 2007-10-28 19:13:50Z lennart $ */
 
1
/* $Id: cpulimit.c 2011 2007-11-01 01:42:34Z lennart $ */
2
2
 
3
3
/***
4
4
  This file is part of PulseAudio.
113
113
 
114
114
/* The signal handler, called on every SIGXCPU */
115
115
static void signal_handler(int sig) {
 
116
    int saved_errno;
 
117
 
 
118
    saved_errno = errno;
116
119
    pa_assert(sig == SIGXCPU);
117
120
 
118
121
    if (phase == PHASE_IDLE) {
150
153
        write_err("Hard CPU time limit exhausted, terminating forcibly.\n");
151
154
        _exit(1); /* Forced exit */
152
155
    }
 
156
 
 
157
    errno = saved_errno;
153
158
}
154
159
 
155
160
/* Callback for IO events on the FIFO */