summaryrefslogtreecommitdiff
path: root/libc/misc/syslog
AgeCommit message (Collapse)Author
2015-12-17Fix syslog messages lost after syslogd restartsVladislav Grishenko
If syslogd is stopped and restarted while a process has the log open, the next message that process produces will be logged to the console and not to the new instance of syslogd. Further messages will be routed correctly, but not the first one. Based on original patch Bug 3889 - syslog loses messages when syslogd restarted https://bugs.busybox.net/show_bug.cgi?id=3889 function old new delta openlog 33 68 +35 __vsyslog 851 848 -3 openlog_intern 318 259 -59 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 35/-62) Total: -27 bytes Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
2013-02-05buildsys: switch libc to kbuild-styleBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15ssp: rework, sync messages with the ones in glibcPeter S. Mazinger
Touch signals only if DODEBUG is enabled. Make the signal selection dependent on DODEBUG, as last resort use SIGKILL. Use internal functions with less arguments, some savings. Fix a warning about unused argument. Do not use openlog/closelog, while there remove their hidden versions. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15syslog.c: disable locking in setlogmaskPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15syslog.c: no need for hidden vsyslog, use a static __vsyslog insteadPeter S. Mazinger
It is only used within the same file. Guard the visible version according to header. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15remove __FORCE_GLIBCPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-11syslog: fix 'everyone logs with user facility'Roman I Khimov
It's been found that on uclibc-based system most of the programs log with 'user' facility despite the calls to openlog() with other facilities explicitly set. Most but not all. Investigating that I've found that the ones logging with proper facilities used LOG_NDELAY in openlog(). The problem is that LogFacility is overwritten in openlog_intern and LOG_USER is passed to it from vsyslog() no matter what the program set with openlog(). Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-03-25prettify make cleanBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-12-13syslog: use send(MSG_NOSIGNAL) instead of write, thus no need to handle SIGPIPEDenys Vlasenko
Size changes by this and previous change: text data bss dec hex filename 1151 13 2 1166 48e libc/misc/syslog/syslog.o 1093 10 2 1105 451 libc/misc/syslog/syslog.o 1047 10 2 1059 423 libc/misc/syslog/syslog.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-13syslog: fix openlog(xx, LOG_KERN) and optimize a bitDenys Vlasenko
The fix: logfac == 0 in openlog(xx, logfac) is allowed now. Corresponding internal openlog() call in vsyslog() uses explicit LOG_USER in order to set it as a default facility. Optimizations: mylock is not recursive now, since a single intenal call of openlog is converted to a call to openlog_internal which assumes that lock is already taken. No recursive locking is possible now. LogFacility is reduced to byte. cache static LogFile in auto variable fd (smaller code). vsyslog with bogus pri parameter wouldn't lock/unlock and mess with signals - it will just return at once. pass NULL as ident string in internal openlog call - same effect as passing LogTag but smaller code. comment out "if (LogTag)" checks - it is never NULL. use the same struct sigaction for setting new sigaction and for saving old one - saves ~32 bytes of stack. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-05math.h: fix trivial typo (missing !): !defined __NO_LONG_DOUBLE_MATHDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-17support building out-of-treeBernhard Reutner-Fischer
Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2008-12-01on Bernd's request, remove commented-out code snippetsDenis Vlasenko
2008-12-01optimize signal mask ops. comment out "impossible" errorsDenis Vlasenko
text data bss dec hex filename - 1179 13 2 1194 4aa libc/misc/syslog/syslog.o + 1165 13 2 1180 49c libc/misc/syslog/syslog.o - 435 4 0 439 1b7 libc/pwd_grp/lckpwdf.o + 393 4 0 397 18d libc/pwd_grp/lckpwdf.o - 38 0 0 38 26 libc/signal/sigandset.o + 32 0 0 32 20 libc/signal/sigandset.o - 63 0 0 63 3f libc/signal/sigblock.o + 56 0 0 56 38 libc/signal/sigblock.o - 22 0 0 22 16 libc/signal/sigempty.o + 20 0 0 20 14 libc/signal/sigempty.o - 25 0 0 25 19 libc/signal/sigfillset.o + 20 0 0 20 14 libc/signal/sigfillset.o - 34 0 0 34 22 libc/signal/sigisempty.o + 16 0 0 16 10 libc/signal/sigisempty.o - 38 0 0 38 26 libc/signal/sigorset.o + 32 0 0 32 20 libc/signal/sigorset.o - 119 0 0 119 77 libc/signal/sigpause.o + 113 0 0 113 71 libc/signal/sigpause.o - 215 0 0 215 d7 libc/signal/sigset.o + 211 0 0 211 d3 libc/signal/sigset.o - 63 0 0 63 3f libc/signal/sigsetmask.o + 56 0 0 56 38 libc/signal/sigsetmask.o - 194 0 1 195 c3 libc/stdlib/abort.o + 183 0 1 184 b8 libc/stdlib/abort.o - 323 0 0 323 143 libc/unistd/sleep.o + 309 0 0 309 135 libc/unistd/sleep.o
2008-11-20Last portion of libc_hidden_proto removal.Denis Vlasenko
Appears to build fine (several .configs tried)
2008-11-20next portion of libc_hidden_proto removalDenis Vlasenko
2008-11-18libc_hidden_proto removal, just a few functionsDenis Vlasenko
2008-11-07- less verbose make cleanBernhard Reutner-Fischer
2008-06-06Fix hard-to-rigger locking bug in vsyslog():Denis Vlasenko
SIGPIPE handler was attempting to re-acquire an already taken lock. While at it, stop checking for sigaction failure which is not possible here. Sizes: text data bss dec hex filename - 1123 13 2 1138 472 libc/misc/syslog/syslog.o + 1112 13 2 1127 467 libc/misc/syslog/syslog.o Run tested.
2008-06-03syslog.c: fix a buglet in prev-last commit: logic inversion in closelogDenis Vlasenko
2008-06-03syslog.c: fix indentation and style. No code changes.Denis Vlasenko
2008-06-03Fix bug 575 and other small problems noticed along the way.Denis Vlasenko
The bug: this blocks in syslogd is stopped: #include <syslog.h> int main() { int i; for (i = 0; i < 10000; i++) syslog(LOG_INFO, "Testing, disregard...................."); return 0; } Fix: set O_NONBLOCK on fd to "/dev/log". Other fixes: do not try to write to fd -1, do not spin forever or EAGAIN, use constant sockaddr instead of recreating identical one each time, eliminate one intermediate function (SUGPIPE sig handler), use smallints where appropriate, add a few comments. Size: text data bss dec hex filename - 1140 16 21 1177 499 libc/misc/syslog/syslog.o + 1123 13 2 1138 472 libc/misc/syslog/syslog.o
2008-06-03- adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer
like o UCLIBC_HAS_GNU_ERROR o UCLIBC_HAS_BSD_ERR o UCLIBC_HAS_PTY o UCLIBC_HAS_GETPT (1) o UCLIBC_SYSCALL_STUBS o UCLIBC_SYSCALL_STUB_WARNING o UCLIBC_LINUX_SPECIFIC (2) o UCLIBC_BSD_SPECIFIC (3) o UCLIBC_NTP_LEGACY (4) o UCLIBC_SV4_DEPRECATED (5) o UCLIBC_HAVE_REALTIME (6) o UCLIBC_HAVE_ADVANCED_REALTIME (7) o UCLIBC_HAVE_EPOLL (8) o UCLIBC_HAVE_XATTR (9) o UCLIBC_HAVE_PROFILING (10) (1) make non-standard getpt optional and implement standard posix_openpt (2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(), personality() ppoll(), setresuid() (3) mincore(), getdomainname(), setdomainname() (4) ntp_adjtime(), ntp_gettime() aliases (5) ustat() [use statfs(2) in your code instead] (6) All marked as "(REALTIME)" in SUSv3 (7) All marked as "(ADVANCED REALTIME)" in SUSv3 (8) epoll_create(), epoll_ctl(), epoll_wait() (9) all Extended Attributes (10) helpers for gcc's -finstrument-functions - Fixes _dl_exit() - Implements sleep(3) for !UCLIBC_HAVE_REALTIME - Implements usleep(3) for !UCLIBC_HAVE_REALTIME - adds #warning about incorrect posix_fadvise{,64}() - removes unused and unwanted uselib() Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead of formerly 130k.
2008-05-30- shrink a little bit.Bernhard Reutner-Fischer
text data bss dec hex filename 1176 16 24 1216 4c0 libc/misc/syslog/syslog.o.orig 1140 16 21 1177 499 libc/misc/syslog/syslog.o
2008-05-19Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko
in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
2008-04-28Experimentally move libc_hidden_proto(time) to time.h.Denis Vlasenko
The only code change observed is actually a case where we were not doing that as needed: 00000000 <__GI_tzset>: -53 push %ebx -e8 00 00 00 00 call 6 <__GI_tzset+0x6> -5b pop %ebx -81 c3 03 00 00 00 add $0x3,%ebx - R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 6a 00 push $0x0 -e8 fc ff ff ff call 10 <__GI_tzset+0x10> - R_386_PLT32 time +e8 fc ff ff ff call 3 <__GI_tzset+0x3> + R_386_PC32 __GI_time 3d ff 4e 98 45 cmp $0x45984eff,%eax 0f 9e c0 setle %al 0f b6 c0 movzbl %al,%eax 50 push %eax -e8 fc ff ff ff call 21 <__GI_tzset+0x21> +e8 fc ff ff ff call 14 <__GI_tzset+0x14> R_386_PC32 _time_tzset 58 pop %eax 5a pop %edx -5b pop %ebx c3 ret No mass migration of libc_hidden_proto(foo) planned. Lets wait for potential fallout first.
2008-01-05blah, enable the stupid hidden proto for fcntlMike Frysinger
2008-01-05krichy writes in 292:Mike Frysinger
I noticed, that in libc/misc/syslog/syslog.c when the syslog socket is opened, the close-on-exec flag is not set, as it is in gnu libc. This enables that behavior.
2006-12-07Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen
things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
2006-07-05fixup my copyright notice, trim stale remnants of older notices whichEric Andersen
I had clearly run search/replace on that were cluttering things up.
2006-02-13libc-{a,so,multi}-y replaced by libc-y covering common objects both in ↵Peter S. Mazinger
libc.a/libc.so, the diffs go into libc-static-y/libc-shared-y exclusively, add IMA to libc, don't use any MSRC anymore
2006-01-22Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA ↵Peter S. Mazinger
is a useless attempt
2006-01-14hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger
missing headers, other jump relocs removed
2005-12-13Convert all users of earlier hiddensPeter S. Mazinger
2005-12-10fix warningMike Frysinger
2005-12-09Implement hidden poll, switch user to hidden *printf/*scanf/pollPeter S. Mazinger
2005-12-08mmap/mremap/socket/rewind gonePeter S. Mazinger
2005-12-08Convert the rest of users to hiddenPeter S. Mazinger
2005-12-08Reorder and remove prototypesPeter S. Mazinger
2005-12-06Add prototype for __time, #define time __time is not usable herePeter S. Mazinger
2005-12-06macro out the thread funcs in libc if threading is disabledMike Frysinger
2005-12-03More hiding, including __mempcpyPeter S. Mazinger
2005-12-01Hide mostly used functionsPeter S. Mazinger
2005-11-27Hide some of mem* and str*Peter S. Mazinger
2005-11-21Remove TOPDIRPeter S. Mazinger
2005-11-10Use strchr instead of index (BSD)Peter S. Mazinger
2005-11-01Remove last unused references to libc-a-pic-, we use only the lists in ↵Peter S. Mazinger
libc-a-y for objects that go into static libs, changing their suffix to .os, of they should be PIC
2005-10-29Replace all Makefiles for new build infrastucturePeter S. Mazinger
2005-10-25All Makefile.in's. Only arm/i386/mips/powerpc/x86_64 are done, the other ↵Peter S. Mazinger
archs lack proper crt1. The Makefiles in extra/scripts are intended to be linked into each dir, where it is necessary to build locally.