Compare commits
2 Commits
0c37278ced
...
c37f05bc35
Author | SHA1 | Date | |
---|---|---|---|
c37f05bc35 | |||
b88de94327 |
@ -14,8 +14,9 @@ typedef struct {
|
||||
|
||||
static void sink_info_callback(pa_context *ctx, const pa_sink_info *info,
|
||||
int eol, TargetData *target) {
|
||||
if (info) {
|
||||
kill(target->pid, target->signum);
|
||||
if (info && kill(target->pid, target->signum) < 0) {
|
||||
ERROR("terget process died\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +63,10 @@ static void state_callback(pa_context *ctx, TargetData *target) {
|
||||
pa_operation_unref(op);
|
||||
break;
|
||||
case PA_CONTEXT_FAILED:
|
||||
kill(target->pid, target->signum);
|
||||
if (kill(target->pid, target->signum) < 0) {
|
||||
ERROR("terget process died\n");
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user