[BusyBox] another one on circular buffer syslogd
Gennady Feldman
gfeldman at mail.com
Wed Jan 3 23:47:23 UTC 2001
Hello Michael.
I am sorry for not responding sooner, but I am out of the office
this
week. So I don't get to check/reply my e-mail as I usually do. The
multiple processes for syslogd is a known thing and was discussed
before. There might be a fix for this to get circular buffer working. I
can remove the code to deallocate the buffer and it should work fine for
this case. However the buffer will stay allocated and if syslogd is
restarted it will try to claim it. It actually does that already, so if
you 'kill -9' syslogd and then start it again it will use the same
shared memory it used before, but will reset/clear the buffer. I am
actually unsure what is the best approach for this. You could comment
out the line where it says "exiting syslogd" in my debug printf which
deallocates the semaphores and memory and it should work fine. However
memory will not be released back to the system once syslogd -C is
started.
P.S. Can somebody verify a bug when running latest busybox sh in
interactive mode (full fledged shell) and starting daemon processes like
syslogd. Then doing ps. It should 'sh' instead of 'syslogd' for all
processes started from inside the shell (internal commands from
busybox).
G.F.
Michael Renzmann wrote:
>
> Hi all.
>
> Erm, is anyone actually reading my mails concerning that circular buffer
> syslogd? At least Gennady? There was very few response on that by now...
> :)
>
> It seems that the "multiple syslogd instances" problem is due to a
> multi-fork bug in syslogd. On my test system 'ps' shows the following
> (among other programs):
>
> 32 klogd -C -m 0
> 33 syslogd -C -m 0
> 39 syslogd -C -m 0
> 45 syslogd -C -m 0
> ... and so on...
>
> When looking at the pid/ppid of each process the following shows up:
> # cat /proc/33/status
> [...]
> pid 33
> ppid 1
> [...]
>
> # cat /proc/<any other syslod pid, e.g. 39>/status
> [...]
> pid <any other syslod pid, e.g. 39>
> ppid 33
> [...]
>
> One process is the father, the rest are childs. So there seems to be a
> forking problem somewhere. Any ideas where to look at for this?
>
> Bye, Mike
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox
Shop Safely Online Without a Credit Card
http://www.rocketcash.com
More information about the busybox
mailing list