summaryrefslogtreecommitdiffstats
path: root/libdaemon
Commit message (Collapse)AuthorAgeFilesLines
* LICENSE: change license to MITHEADmasterBrandon Philips2012-09-0314-178/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the spirit of 70df7aaa lets change the license again, this time to MIT! Context: On 23:15 Tue 10 Apr 2012, Lennart Poettering wrote: > On Mon, 09.04.12 14:51, Brandon Philips (brandon@ifup.org) wrote: > > I am working on a daemon and it would be great to use libdaemon. > > However, the project is Apache licensed and I have no idea how they > > interact. Is it at all possible to dual license LGPL/BSD or LGPL/Apache? > > > > https://github.com/racker/virgo > > heya. I am not such a big fan of the BSD licenses myself, but I guess in > this case it is OK. Yea :-/ > The only major other contributor seems to be Diego Pettenò who should be > OK with such a change. I'll ask him. Great, thank you. > Would you be OK with MIT as well? Yes, the MIT license works too.
* dlog: lower default verbosity to INFOLennart Poettering2009-10-181-1/+1
|
* dlog: introduce DAEMON_SET_VERBOSITY_AVAILABLELennart Poettering2009-10-181-2/+7
|
* dlog: reformat daemon_set_verbosity()Lennart Poettering2009-10-181-10/+7
|
* doxygen updatesLennart Poettering2009-10-184-18/+58
|
* dfork: set errno properly in some error conditionsLennart Poettering2009-10-181-1/+3
|
* dfork: clean up forking logicAndorz Nilsson2009-10-181-17/+21
| | | | | | | | | | | | | Call setsid() once only to make sure we get a process that is not a session leader or process group leader, and hence cannot acquire a controlling terminal. It looks like setpgid() (or setpgrp()) is used only when setsid() is not available. It looks like the call to ioctl() is necessary only for 4.3BSD. (Patch modified by Lennart Poettering)
* dfork: close all fds >=3, including 3 itselfLennart Poettering2009-10-171-1/+1
|
* dfork: daemon_retval_done() might close socket already closed in ↵Stefan2009-10-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | daemon_close_allv() No Avahi daemon is running. If I start it at command-line with etc/init.d/avahi-daemon start or simply with avahi-daemon -D then the avahi-daemon eats all CPU-time. Stracing the process shows, that it loops endlessly in gettimeofday({1231956423, 692711}, NULL) = 0 gettimeofday({1231956423, 692735}, NULL) = 0 poll([{fd=5, events=POLLIN}, {fd=15, events=POLLIN}, \ {fd=14, events=POLLIN}, {fd=13, events=POLLIN}, \ {fd=12, events=POLLIN}, {fd=11, events=POLLIN}, \ {fd=10, events=POLLIN}, {fd=8, events=POLLIN}], 8, 62150) = 1 \ ([{fd=5, revents=POLLNVAL}]) The fd=5 is a BADFD. I found out that the fd was closed by daemon_retval_send() from libdaemon. (But: I think avahi-daemon should handle the POLLERR nevertheless.) Looking in libdaemon I found, that the library had already closed the fd=5 in daemon_close_all(), and closed it "again" as _daemon_retval_pipe[0] in daemon_retval_send() -> daemon_retval_done(), but in the meantime, this is an fd from the application, not from the library. I think, after closing _daemon_retval_pipe[0] in daemon_close_allv() the fd must be marked as closed. I have attached a patch. For me it works fine.
* dfork: honour _SC_OPEN_MAXLennart Poettering2009-10-171-7/+6
|
* libdaemon 0.13 compiler warning issueStefan Seyfried2009-10-171-1/+2
| | | | | see https://bugzilla.novell.com/show_bug.cgi?id=449728 The patch I packaged up for this is attached.
* Merge remote branch 'flameeyes/noundefined'Lennart Poettering2009-10-171-1/+1
|\
| * If the linker suppors it, ensure that the library has no undefinedDiego E. 'Flameeyes' Pettenò2008-11-191-1/+1
| | | | | | | | | | | | | | references. This is important to make sure that no bugs are introduced that breaks when using --as-needed.
* | dnonblock: use O_NONBLOCK instead of O_NDELAY to follow current POSIX namingLennart Poettering2009-04-201-2/+2
| |
* | dnonblock: make daemon_nonblock() actually workLennart Poettering2009-04-201-1/+1
|/ | | | Issue pointed out by Charles Lindsay.
* add missing inclusion of sys/time.hLennart Poettering2008-10-261-0/+1
|
* Add support for setting verbosity level for stdout/stderr output.Diego 'Flameeyes' Pettenò2008-10-012-0/+32
|
* Conditionally declare variables if their use is conditional.Diego 'Flameeyes' Pettenò2008-10-011-1/+3
| | | | | Reduces warnings about unused variables by not declaring them if they are under an #ifdef conditional.
* Fix building on OpenSolaris (without _NSIG definition).Diego 'Flameeyes' Pettenò2008-10-011-1/+9
| | | | | | | On OpenSolaris, the _NSIG macro is not defined, but NSIG is; as it's not possible to use NSIG under glibc (it would miss the SIGRT* series), define a SIGNAL_UPPER_BOUND depending on the system (and error out if the system lacks both NSIG and _NSIG).
* Revert "bump soname/version" which was innappropriately named and a bad idea ↵v0.13Lennart Poettering2008-07-291-1/+0
| | | | | | anyway This reverts commit b05a9ea7518befdae73772becaf9bc4b11711f80.
* bump soname/versionLennart Poettering2008-07-291-0/+1
|
* fix indentingLennart Poettering2008-07-281-1/+1
|
* close fds/reset sigs for exec'ed processesLennart Poettering2008-07-281-0/+2
|
* add a bit more error checkingLennart Poettering2008-07-281-4/+14
|
* save/restore errno where applicableLennart Poettering2008-07-281-2/+17
|
* decrement number of possible argsLennart Poettering2008-07-281-2/+1
|
* shorten code a bitLennart Poettering2008-07-281-4/+1
|
* make retval checking more portableLennart Poettering2008-07-281-1/+1
|
* be a bit more explicativeLennart Poettering2008-07-281-1/+1
|
* save/restore errno where applicableLennart Poettering2008-07-281-1/+3
|
* fix a few thinkos in handling of exception listsLennart Poettering2008-07-281-12/+28
|
* create retval pipes once onlyLennart Poettering2008-07-281-2/+8
|
* save and restore errno where necessaryLennart Poettering2008-07-281-0/+7
|
* add more error checkingLennart Poettering2008-07-281-1/+9
|
* reorder a few things, so that logging works properly very early alreadyLennart Poettering2008-07-281-14/+15
|
* add a bit more error checkingLennart Poettering2008-07-281-3/+10
|
* fix indentationLennart Poettering2008-07-281-1/+1
|
* save and restore errno in destructorLennart Poettering2008-07-281-0/+4
|
* make sure we don't keep a round a va_list that is started but not stoppedLennart Poettering2008-07-281-5/+3
|
* destruct signal fds on failureLennart Poettering2008-07-281-1/+3
|
* don't call fcntl unless we have toLennart Poettering2008-07-281-6/+7
|
* update licenses/file headersLennart Poettering2008-07-2814-298/+284
|
* modernize build systemLennart Poettering2008-07-281-1/+1
|
* add API to block/reset signalsLennart Poettering2008-04-252-61/+275
| | | | git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@139 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
* fix doc wordingLennart Poettering2008-04-251-4/+4
| | | | git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@138 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
* Use asprintf() to set the path of the pidfile rather than using a 4KB static ↵Lennart Poettering2008-03-261-17/+23
| | | | | | buffer. Modified patch from Flameeyes git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@136 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
* Respect what the user requested as localstate directory, rather than ↵Lennart Poettering2008-03-262-1/+3
| | | | | | hardcoding /var. Patch from Flameeyes git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@135 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
* document daemon_logv() a bit better. Patch from tedpLennart Poettering2007-11-141-1/+4
| | | | git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@133 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
* save and restore errno in sighandlerLennart Poettering2007-10-301-0/+2
| | | | git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@132 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
* if opening the pid file on O_RDWR doesn't work, fallback to O_RDONLYLennart Poettering2007-09-101-3/+13
| | | | git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@131 153bfa13-eec0-0310-be40-b0cb6a0e1b4b