File: testdbuslaunch.c

package info (click to toggle)
fcitx 1%3A4.2.9.9-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 19,800 kB
  • sloc: ansic: 134,151; cpp: 7,280; sh: 2,778; python: 800; xml: 345; makefile: 42
file content (22 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <assert.h>
#include <stdio.h>
#include <signal.h>
#include "dbuslauncher.h"

int main()
{
    DBusDaemonProperty daemonProp = DBusLaunch(NULL);
    if (daemonProp.pid != 0)
    {
        assert(daemonProp.address != NULL);
        printf("dbus-daemon address %s\n", daemonProp.address);
        int result = DBusKill(&daemonProp);
        printf("kill dbus-daemon result %d\n", result);
    }
    else {
        assert(daemonProp.address == NULL);
        printf("dbus-daemon launch failed\n");
    }

    return 0;
}