diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-24 16:27:01 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-24 16:27:01 +0000 |
commit | b6854528e79a94c6604fac6c9ad31b307d9968fe (patch) | |
tree | de5ec35efe2ba8cd3811a44295778e160da546a6 /syslogd.c | |
parent | 989d0ed8581de3cb5b6b8ed7a1aa25708638cbb3 (diff) | |
download | rsyslog-b6854528e79a94c6604fac6c9ad31b307d9968fe.tar.gz rsyslog-b6854528e79a94c6604fac6c9ad31b307d9968fe.tar.xz rsyslog-b6854528e79a94c6604fac6c9ad31b307d9968fe.zip |
hardned syslogd for a very unusual low memory condition
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -2317,7 +2317,7 @@ static void processMsg(msg_t *pMsg) /* log the message to the particular outputs */ if (!Initialized) { - fprintf(stderr, "%s\n", pMsg->pszMSG); + fprintf(stderr, "rsyslog: %s\n", pMsg->pszMSG); return; #if 0 /* TODO: I temporarily disable the emergency logging system. We must re-think * how this is done, as we now have modules. @@ -4289,7 +4289,12 @@ static void init() /* allocate next entry and add it */ f = (selector_t *)calloc(1, sizeof(selector_t)); - /* TODO: check for NULL pointer (this is a general issue in this code...)! */ + if(f == NULL) { + /* this time, it looks like we really have no point in continuing to run... */ + logerror("fatal: could not allocated selector\n"); + exit(1); /* TODO: think about it, maybe we can avoid */ + } + /* be careful: the default below must be set BEFORE calling cfline()! */ f->f_un.f_file.f_sizeLimit = 0; /* default value, use outchannels to configure! */ |