summaryrefslogtreecommitdiffstats
path: root/src/Daemon/Daemon.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix compile-time warnings.Denys Vlasenko2009-08-091-2/+3
| | | | | | | One fix (in CCrashWatcher::GetPluginsInfo) needs closer look, others are "trivially correct" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* style fixes, no code changesDenys Vlasenko2009-08-091-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix bug 54: make abrt (without -d) report initialization errorsDenys Vlasenko2009-08-061-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example (strace): 10053 17:18:58.384259 close(0) = 0 10053 17:18:58.384293 open("/dev/null", O_RDWR) = 0 child is created: 10053 17:18:58.384354 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f50eea1c880) = 10054 parent sleeps, child initializes: 10053 17:18:58.384678 nanosleep({0, 100000000}, <unfinished ...> 10054 17:18:58.384751 setsid() = 10054 10054 17:18:58.384794 close(1) = 0 10054 17:18:58.384828 close(2) = 0 10054 17:18:58.384870 dup(0) = 1 10054 17:18:58.384901 dup(0) = 2 10054 17:18:58.385099 open("/usr/app/abrt-TEST/var/etc/abrt/abrt.conf", O_RDONLY) = 3 ... 10054 17:18:58.449108 inotify_init() = 4 10054 17:18:58.449148 inotify_add_watch(4, "/usr/app/abrt-TEST/var/cache/abrt", IN_CREATE) = 1 10054 17:18:58.449228 fstat(4, {st_mode=S_IFDIR|0600, st_size=0, ...}) = 0 10054 17:18:58.449288 fcntl(4, F_GETFL) = 0 (flags O_RDONLY) child: initialization is done, it signals parent: 10054 17:18:58.449346 getppid() = 10053 10054 17:18:58.449380 kill(10053, SIGTERM) = 0 10054 17:18:58.449427 write(1, "Debug: Running...\n"..., 18 <unfinished ...> 10053 17:18:58.449447 <... nanosleep resumed> 0) = ? ERESTART_RESTARTBLOCK (To be restarted) 10054 17:18:58.449470 <... write resumed> ) = 18 10054 17:18:58.449494 open("/usr/app/abrt-TEST/var/run/abrt.lock", O_RDWR|O_CREAT, 0640 <unfinished ...> 10053 17:18:58.449517 --- SIGTERM (Terminated) @ 0 (0) --- 10054 17:18:58.449565 <... open resumed> ) = 5 10053 17:18:58.449583 rt_sigreturn(0xf <unfinished ...> 10054 17:18:58.449607 fcntl(5, F_SETLK, {type=F_WRLCK, whence=SEEK_CUR, start=0, len=0} <unfinished ...> sleep(100ms) is interrupted: 10053 17:18:58.449629 <... rt_sigreturn resumed> ) = -1 EINTR (Interrupted system call) 10054 17:18:58.449664 <... fcntl resumed> ) = 0 10054 17:18:58.449688 unlink("/usr/app/abrt-TEST/var/run/abrt.pid" <unfinished ...> parent exits 0 because it got TERM which means child is ok: 10053 17:18:58.449713 exit_group(0) = ? ... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* On exit, take care to emit consistent exit status.Denys Vlasenko2009-07-171-5/+13
| | | | | | If we were Ctrl-C'ed, then we should exit by killing ourself, not exit(N). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rework unsafe handling of SIGINT/SIGTERMDenys Vlasenko2009-07-171-8/+8
| | | | | | | | | | Signals are asynchronous. It is unsafe to perform such complex operations in a signal handler. I changed signal handler to just set a flag, and added an event source which returns an event when this variable is set. The action is to stop event loop. Execution then falls through to program exit. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Restore /proc/sys/kernel/core_pattern on error exit.Denys Vlasenko2009-07-151-2/+18
| | | | | | The bug was observed when dbus-abrt.conf is missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* proper way how to daemonizeZdenek Prikryl2009-06-241-7/+20
|
* Merge branch 'master' of ssh://git.fedorahosted.org/git/abrtJiri Moskovcak2009-05-201-0/+5
|\
| * improved catching of exceptionsZdenek Prikryl2009-05-181-0/+5
| |
* | Merge branch 'master' of ssh://git.fedorahosted.org/git/abrtJiri Moskovcak2009-05-121-1/+1
|\| | | | | | | | | Conflicts: src/Daemon/Daemon.cpp
| * support for simpler settingsZdenek Prikryl2009-05-121-1/+1
| |
* | Code cleanupJiri Moskovcak2009-05-121-9/+5
|/
* final touch on commlayer, minor fixes in exceptions (zprikryl)Jiri Moskovcak2009-04-241-36/+22
|
* added new interface frof settingsZdenek Prikryl2009-04-021-18/+18
|
* Added commlayer to make dbus optionalJiri Moskovcak2009-04-011-4/+4
|
* Added report functions to daemonJiri Moskovcak2009-02-251-7/+6
|
* Better signal handling in daemonJiri Moskovcak2009-02-231-4/+18
|
* Moved dbus backend from dbus lib to daemon - better OO model.Jiri Moskovcak2009-02-191-1/+9
| | | | Modified dbus policy config file to allow all users to call daemon's methods
* Initial git commitJiri Moskovcak2009-02-021-0/+66