static void make_pidfile()
{
string pidfile = zavai.config.homedir + "/" + pidfilename + ".pid";
- FileUtils.set_contents(pidfile, "%d".printf(Posix.getpid()));
+ try {
+ FileUtils.set_contents(pidfile, "%d".printf(Posix.getpid()));
+ } catch (FileError e) {
+ zavai.log.error("Cannot create pidfile " + pidfile + ": " + e.message);
+ }
}
static void on_kill(int sig)
arg_description = null },
OptionEntry()
};
- Gtk.init_with_args(ref args, "", entries, null);
+ try {
+ Gtk.init_with_args(ref args, "", entries, null);
+ } catch (Error e) {
+ zavai.log.error("Cannot init gtk: " + e.message);
+ return 1;
+ }
Gst.init (ref args);
pidfilename = "zavai";