summaryrefslogtreecommitdiff
path: root/src/service.h
AgeCommit message (Collapse)Author
2012-01-06unit: properly update references to units which are mergedLennart Poettering
When we merge units that some kind of object points to, those pointers might become invalidated, and needs to be updated. Introduce a UnitRef struct which links up all the unit references, to ensure corrected references. At the same time, drop configured_sockets in the Service object, and replace it by proper UNIT_TRIGGERS resp. UNIT_TRIGGERED_BY dependencies, which allow us to simplify a lot of code.
2012-01-05fix compilation error with 'PathSpec redefined'Zbigniew Jędrzejewski-Szmek
2011-12-03service: handle services with racy daemonization gracefullyMichal Schmidt
There are a lot of forking daemons that do not exactly follow the initialization steps as described in daemon(7). It is common that they do not bother waiting in the parent process for the child to write the PID file before exiting. The daemons' developers often do not perceive this as a bug and they're unwilling to change. Currently systemd warns about the missing PID file and falls back to guessing the main PID. Being not quite deterministic, the guess can be wrong with bad consequences. If the guessing is disabled, determinism is achieved at the cost of losing the ability of noticing when the main process of the service dies. As long as it does not negatively affect properly written services, systemd should strive for compatibility even with services with racy daemonization. It is possible to provide determinism _and_ main process supervision to them. If the PID file is not there, rather than guessing and considering the service running immediately after getting the SIGCHLD from the ExecStart (or ExecStartPost) process, we can keep the service in the activating state for a bit longer. We can use inotify to wait for the PID file to appear. Only when it finally does appear and we read a valid PID from it, we'll move the service to the running state. If the PID file never appears, the usual timeout kicks in and the service fails.
2011-06-21service: check whether sysv scripts where changedLennart Poettering
2011-04-28service: properly notice when services with a main process that isn't a ↵Lennart Poettering
child of init die https://bugzilla.redhat.com/show_bug.cgi?id=699114
2011-03-30unit: never apply /etc/rcN.d/ priority to native servicesLennart Poettering
2011-02-13service: make main pid guessing optional, and reread pid file after reloadsLennart Poettering
2011-01-20service: make chain of main commands and control commands independent of ↵Lennart Poettering
each other, so that both can be executed simultaneously and independently
2011-01-20service: when reloading a service fails don't fail the entire service but ↵Lennart Poettering
just the reload job
2011-01-18execute: make sending of SIGKILL on shutdown optionalLennart Poettering
2010-10-13mount: hook in q fsck@.service instance for all mount points with passno > 0Lennart Poettering
2010-10-08service: introduce Restart=on-failure and Restart=on-abortLennart Poettering
2010-10-05service: rename settings for Restart= from 'restart-always' to 'always' and ↵Lennart Poettering
similar
2010-10-05socket: make sockets to pass to a service configurableLennart Poettering
2010-09-27sysv: optionally disable of SysV init/rcN.d support at compile timeFabiano Fidencio
This patch adds a cpp definition HAVE_SYSV_COMPAT that is used to isolate code dealing with /etc/init.d and /etc/rcN.d for systems where it does not make sense (one that does not use sysv or one that is fully systemd native). The patch tries to be as little intrusive as possible, however in order to minimize the number of #ifdef'ed regions I've reordered some code in path-lookup.c:lookup_paths_init() where all code dealing with sysv is now isolated under running_as == MANAGER_SYSTEM as well. Moreover, In struct Service, some fields were rearranged to reduce the number of ifdefs. Lennart's suggestions were fixed and squashed with the original patch, that was sent by Gustavo Sverzut Barbieri (barbieri@profusion.mobi).
2010-08-31manager: add missing second part of s/maintenance/failed/Matthew Miller
2010-08-17service: rename ValidNoProcess= to RemainAfterExit=Lennart Poettering
2010-08-17emacs: disable tabs in .h files, tooLennart Poettering
2010-08-13service: rename Type=finish to Type=oneshot and allow multiple ExecStart= ↵Lennart Poettering
lines for oneshot services In contrast to the other service types oneshot services are usually not long lasting and there's not necessarily a single clean main process for them. This change allows multiple ExecStart= lines for this type of services so that the admin/developer doesn't have to arbitrarily pick on of various sequential commands as the "main one".
2010-08-09main: fix auto restarting of units after a configuration reloadLennart Poettering
2010-08-09service: properly remember if a sysv is actually enabledLennart Poettering
Previously we checked the SysV priority value to figure out if a SysV unit was enabled or not, since th value was mostly read from the S startup links. Since we read this value from the LSB headers as a fallback we hence ended up considering a lot more services enabled than were actually enabled. This patch adds an explicit boolean which encodes whether a sysv service is enabled or not via S links. https://bugzilla.redhat.com/show_bug.cgi?id=615293
2010-07-20device: do not merge devicesLennart Poettering
Don't try to merge devices that have been created via dependencies when they appear in the system and can be recognized as the same. Instead, simply continue to maintain them independently of each other, however with the same state cycle. Why? Because otherwise we'd have a hard time to seperate the dependencies after the devices are unplugged again and we hence cannot be sure anymore that next time the device is plugged in it will carry the same names. Example: if one depndency refers to dev-sda.device and another one to dev-by-id-xxxyyy.device we only learn at time of plug in of the device that it is actually the same device that was ment. In the moment the device is unplugged again we won't know anymore their relation to each other and the next time the harddisk is plugged it might even appear as dev-by-id-xxxyyy.device and dev-sdb.service. To ensure the dependencies continue to have the meaning they were intended to have let's hence keep the .device objects seperate all the time, even when they are plugged in. This patch also introduces a new Following= property which points from the various .device units of a specific device to the main .device unit for it. This can be used by the client side to figure out the relation of the .device units to each other and even filter units from display.
2010-07-10execute: add ability to configure the kill signalLennart Poettering
2010-06-19socket: enforce limit on number of concurrent connectionsLennart Poettering
2010-06-18service: add minimal access control logic for notifcation socketLennart Poettering
2010-06-16typo: the correct spelling is maintenance not maintainanceLennart Poettering
2010-06-16notify: add minimal readiness/status protocol for spawned daemonsLennart Poettering
2010-06-02service: change default service type to 'simple' since that is the futureLennart Poettering
2010-05-16build-sys: move source files to subdirectoryLennart Poettering