Commit Graph

67 Commits

Author SHA1 Message Date
Yuri Victorovich 6570c7b6f1 Appply patch-daemon_app__supervisor.c from FreeBSD 2024-03-26 20:15:01 +02:00
Nedko Arnaudov c93f0d8458 Don't set LADISH env vars for L0 & L1
Having these variables set enables apps to discrimination
against ladish, by error or otherwise. In particular
neither LADISH L0 nor L1 imply that user should face mayhem
of standard file menu items for either new, open, save
and/or saveas being disabled.
2023-06-05 14:12:11 +03:00
Nedko Arnaudov 9bbfff1608 Fix log calls
* Remove useless ifdefs for LADISH_DEBUG
 * Fix formatting errors
2012-12-02 20:24:22 +02:00
Nedko Arnaudov 2c3c3f0290 Don't notify user about unexpectedly stopped apps that returned 0 exit code. Fixes #197
The exit code detection for apps ran in terminal is not working,
at least with xterm. xterm doesnt seem to be able to return exit
code of its child process.
2012-10-09 02:32:42 +03:00
Nedko Arnaudov cd3684d1ad cdbus: macros for defining interfaces with default handler 2011-11-09 02:59:26 +02:00
Nedko Arnaudov 4202100444 cdbus: prefix macros with CDBUS_ 2011-11-09 02:38:22 +02:00
Nedko Arnaudov 9202dae129 cdbus: remove lash traces
* rename cdbus header include guards to use CDBUS_ instead of LASH_DBUS_
 * remove dbus/error.h and dbus/error.c

error.h contained lash/ladish specific error strings and
lash_dbus_error() prototype. lash_dbus_error() is renamed to
cdbus_error() and its implementation is moved to dbus/method.c. The
D-Bus error strings that have DBUS_ERROR_XXX matches are removed and
their uses are switched to the libdbus variants. The ladish specific
error strings are moved to dbus_constants.h
2011-11-06 00:10:10 +02:00
Nedko Arnaudov 6df7809837 Call the save completion callback when ladish_js_save_app() fails. #185 2011-10-11 03:52:58 +03:00
Nedko Arnaudov f42b4fbef7 operational jack session implementation 2011-10-02 00:47:50 +03:00
Nedko Arnaudov 5483a52daf ladishd: async app supervisor save. async studio and project save. 2011-09-26 05:03:57 +03:00
Nedko Arnaudov 6aa44e9ab9 dbus_ -> cdbus_ renames 2011-09-10 03:35:48 +03:00
Nedko Arnaudov 42cdd70e33 Make the app supervisor interface versioned
unreleased apps using latest api MAY check for interface version

released apps using latest api SHOULD check for interface version
2011-09-10 01:06:08 +03:00
Nedko Arnaudov 8100ea334e ladishd: make the D-Bus app supervisor API backward compatible
In 997630bfb7 the API changed because of LASH and
jack-session support. The level app property was switched from uint8 to string.
However, some externally maintained frontends (claudia, klaudia and festige) use
the 0.3 API.

This changeset restores the 0.3 API and extends it with new functions and signals,
ones that use string instead of uint8 level.
2011-09-06 19:02:55 +03:00
Nedko Arnaudov 1113f0e9d3 ladish_app_send_signal() expectes app be in started state 2011-08-04 04:21:01 +03:00
Nedko Arnaudov 026659406a LASH support in ladishd 2011-08-04 02:59:01 +03:00
Nedko Arnaudov 53845918fe prefix cdbus global vars with unique prefix 2011-07-31 20:04:01 +03:00
Nedko Arnaudov 934fa96a15 ladishd: rename ladish_app_supervisor_save_L1() to ladish_app_supervisor_initiate_save()
This function will initiate save for LASH and JACK session apps as well.
2011-07-30 22:00:29 +03:00
Nedko Arnaudov 997630bfb7 use strings for app levels
With jack-session on the manege, strict L0-L3 classification
does not reflect the actual situation. LASH and jack-session
are still L2 though.
2011-07-28 15:15:47 +03:00
Nedko Arnaudov 7f512b33fc ladishd: fix use of uninitialized memory
sizeof(bool) != sizeof(dbus_bool_t)
on x86, 1 != 4
2011-05-16 06:52:13 +03:00
Nedko Arnaudov 891805634d ladishd: better handling for L1 apps with a2j ports. Fix for #62 2011-01-02 04:27:21 +02:00
Nedko Arnaudov fb7138915e ladishd: dump params of loaded apps after xml load 2010-12-28 06:57:32 +02:00
Nedko Arnaudov 5288134676 ladishd: save&restore app associations of vclients. Fix for #149 2010-12-28 04:33:44 +02:00
Nedko Arnaudov a3956df783 ladishd: send termination signals to firstborn pgrp. Fix for #123
if the pgrp of the first child is different from pgrp of the jack client,
send SIGTERM and SIGKILL to both process groups.

This changeset also switches termination signals send from pid to pgrp
2010-12-25 03:52:39 +02:00
Nedko Arnaudov e8f9b6b02e ladishd: Deassociate pids of disappearing clients. Fix for #119 2010-11-30 00:13:11 +02:00
Nedko Arnaudov 4248abe1d7 ladishd: fix use of uninitialized var in ladish_app_supervisor_set_project_name() 2010-11-18 05:10:18 +02:00
Nedko Arnaudov 99b1ab0da4 ladishd: set env vars for use in commandlines 2010-11-18 02:59:06 +02:00
Nedko Arnaudov 4b9da6ffae ladishd: do a better cleanup on project unload and on load failure. Partial fix for #117
The project state now is can now have more than one state. The project
unload sequence now first removes all connections, then stopps all
apps, and as last step - clears the graph. When project load fails,
ladish_room_unload_project() is not called anymore, because unloading
of room even without apps is now a multistep process. Instead, a new
function, ladish_room_clear_project(), is introduced. It is called
when project load fails and as last step in project unload.
2010-11-13 18:13:10 +02:00
Nedko Arnaudov 698bf81a3b daemon: better handling for non-direct childs. Fixes #62
If the first JACK client that appears has pid different from the one
of the child process, send SIGUSR1 on L1 save to this first
grandchild.

This changeset fixes the "run L1 app in terminal" issue and the
similar issue with dash (the default shell on Debian and Ubuntu, that
for simple commandlines does fork() and exec() instead of just exec(),
like bash does. This changeset also fixes the situation with complex
commandlines that result in only one JACK client.

The complex commandlines that result in multiple processes creating
JACK clients are handled by sending the SIGUSR1 to the first process
that creates JACK client. In future this could be improved by sending
SIGUSR1 to all of them but it is probably better to avoid such
situations by creating one app per JACK-creating process.
2010-10-24 03:03:25 +03:00
Nikita Zlobin 6e2e650bb5 daemon: app_supervisor.c: Include config.h to have _GNU_SOURCE always defined first. Necessary to get working some GNU extensions 2010-10-20 17:48:41 +06:00
Nedko Arnaudov 3657b68d64 ladishd: fix introspection data for AppSupervisor.IsAppRunning 2010-09-21 23:49:10 +03:00
Nedko Arnaudov 7a5ba755e9 Add app list version number to the AppStateChanged signal and check it 2010-09-03 01:49:11 +03:00
Nedko Arnaudov 5374af8866 daemon: update app list version when adding and removing apps
gladish now takes it into account and skipped the changes because the version
was not incremented
2010-09-02 21:56:10 +03:00
Nedko Arnaudov ac1de1cc6a daemon: handle rename of apps that have non-unique names 2010-08-30 00:40:17 +03:00
Nedko Arnaudov 76a8b6161b daemon: handle apps with same name in different vgraphs 2010-08-30 00:05:57 +03:00
Nedko Arnaudov b396329c5d daemon: implementation of project load 2010-08-08 23:51:31 +03:00
Nedko Arnaudov 1d908a66d6 daemon: saveable projects 2010-08-06 05:00:04 +03:00
Nedko Arnaudov a08831a0ca daemon: early check level validity when new app is being added 2010-06-13 21:34:28 +03:00
Nedko Arnaudov d5c7bf6a6c Don't send SIGUSR1 to not started L1 apps. Fix for #96
* ensure that kill() is called only from one place and that pid is valid
 * cleanup and extend app_supervisor functions related to sending signals
2010-05-27 02:10:30 +03:00
Nedko Arnaudov e82916b5d9 daemon: queued remove app command
On app removal, wait app to stop and delete graph objects related to it.
Fixes #86
2010-05-16 11:22:13 +03:00
Nedko Arnaudov c830748430 daemon: make stop and kill app commands async ones 2010-05-08 22:20:08 +03:00
Nedko Arnaudov d2782283a7 daemon: cmd_start_app -> cmd_change_app_state 2010-05-08 21:28:56 +03:00
Nedko Arnaudov df1c44647b daemon: maintain app state enum 2010-05-08 20:40:52 +03:00
Nedko Arnaudov e8e64de150 daemon: document app supervisor methods as sync/async 2010-05-08 19:32:51 +03:00
Nedko Arnaudov e913955b1d daemon: ladish_app_supervisor_check_app_name()
ladish_app_supervisor_find_app_by_name() was not really useful because name can change.
Apps should be searched by their unqiue dbus id instead.
2010-05-08 18:02:39 +03:00
Nedko Arnaudov e5151a68b2 daemon: remove dead code 2010-05-05 01:24:47 +03:00
Nedko Arnaudov cb11dd8edf daemon: detect unexpected app termination and notify user 2010-05-05 01:23:20 +03:00
Nedko Arnaudov bb7a63e216 daemon: handle start_app requests asynchronously 2010-05-05 01:09:42 +03:00
Nedko Arnaudov 16ca901d9a daemon: new_app command
This introduces no new functionality but changes the way new apps are started.
Previously new app request were not queued, they were synchronous.
Now they are queued and asynchronous.
2010-05-04 23:48:23 +03:00
Nedko Arnaudov 43deb74a41 daemon: disable log dump 2010-05-04 22:24:27 +03:00
Nedko Arnaudov 8948f99d7c daemon: refuse to delete room if it has active apps. Fix for #85 2010-04-26 03:47:10 +03:00