Re: -W -Wall options (using gcc), posted by Heiko Scheit on Mon Feb 16 17:18:39 2004
|
> > Have a look at the gcc info pages:
> >
> > $ info gcc "invoking gcc" "warning options"
>
> Sure, I'm not stupid!
Sorry, didn't mean to offend you.
> I looked for ~10 minutes how to turn off the remaining
> warnings, but I could not find it. The code is now correct, like I do want the
> "%y" format specifier in the strftime() function, but the warning is wrong.
One way to remove the warnings would be to use "%Y" in a separate strftime() call
and then taking only the last two digits (characters) of that string.
Something like:
old:
strftime(str, sizeof(str), "%A, %d-%b-%y %H:%M:%S GMT", gmt);
new:
strftime(str, sizeof(str), "%A, %d-%b-XX %H:%M:%S GMT", gmt);
strftime(year, sizeof(year), "%Y", gmt);
i=strstr(str,"XX"); /* find position of XX */
if ( i+1 < sizeof(str) ) {
str[i] =year[3];
str[i+1]=year[4];
} else ...
Somewhat cumbersome, but should work. Maybe consider using the four
digit year directly, where possible.
Gruss, Heiko |
elogd does not exit on SIGTERM, posted by Heiko Scheit on Wed Feb 18 16:54:27 2004
|
When trying to stop elogd processes with the kill command
elogd exits only after access to the logbook.
It should exit immediately, maybe after some cleanup. |
too many <table> tags, posted by Heiko Scheit on Mon Aug 2 14:56:56 2004
|
There are too many <table> tags when displaying a singel entry. E.g.
in http://midas.psi.ch/elogs/Config+Examples/1 the row 'Configuration Name'
is not aligned with the others (see attachment).
Looking at the HTML one sees that there are <table> tags for each row
which should not be there:
<tr><td><table width="100%" cellpadding=0 cellspacing=0><tr><td nowrap
class="attribname">Author:</td><td class="attribvalue">
Stefan Ritt </td>
</tr></table></td></tr> |
Re: too many <table> tags, posted by Heiko Scheit on Tue Aug 3 13:06:54 2004
|
> > There are too many <table> tags when displaying a singel entry. E.g.
> > in http://midas.psi.ch/elogs/Config+Examples/1 the row 'Configuration Name'
> > is not aligned with the others (see attachment).
>
> The <table> tags are there on purpose. As you can combine several attributes
> into one line (see this forum for example), it's necessary to make an
> independent <table> for each line.
Couldn't one include the extra <table> tag only when there is really more than
one attribute per line. All other lines could then be aligned properly.
To increase the width is not really a solution, since this depends on the
text size used. See attachment with really big text. |
curly parenthesis problem , posted by Heiko Scheit on Tue Aug 3 15:44:07 2004
|
Everything after curly parenthesis is ignored in attribute entry boxes
like 'Subject' above
What I typed in the subject line was exatcly this:
'curly parenthesis problem {abc}' |
text display of ascii files not a good idea, posted by Heiko Scheit on Mon Aug 23 13:43:58 2004
|
I think the text display of ASCII files, which is new in version
2.5.4, is not a good idea. E.g. I had a large ps file attached
to one entry and it took a long time display this entry (over DSL).
Then I saw that the ps-file is displayed as text, which is not really
useful.
Probably it is fine to display only files ending in '.txt' per default.
In addition a file that has more than say 1000 lines should probably
also not be displayed (as default, optional OK).
Cheers, Heiko |
Re: elogd does not exit on SIGTERM, posted by Heiko Scheit on Fri Aug 27 00:49:27 2004
|
> Noee. Here it works immediately.
>
> Can you try with a fresh server from the distribution, with the example
> elogd.cfg, to see if there is any difference?
>
> The killing is handled in the funciton ctrlc_handler(), which sets _abort =
> TRUE. This is checked in line 16195, just after the select(), and the main
> loop is exited. The select finishes after one second, although I believe
> that the kill signal also terminates the select prematurely. The kill
> command and a Ctrl-C keystroke should work the same way, they both generate
> a SIGTERM or SIGINT signal.
elogd does not exit if there is an 'unprocessed' HUP. So when you do
kill -HUP <pid>
kill <pid>
elogd will only exit after it was accessed. |
Re: elogd does not exit on SIGTERM, posted by Heiko Scheit on Wed Sep 8 23:03:36 2004
|
> > elogd does not exit if there is an 'unprocessed' HUP. So when you do
> >
> > kill -HUP <pid>
> > kill <pid>
> >
> > elogd will only exit after it was accessed.
>
> Can you please tell me how to reproduce this problem?
>
> Even if I do a
>
> kill -HUP <pid>; kill <pid>
>
> it works immediately when I start elogd manually in interactive mode (not as daemon).
Even though I can't test this right now, I assume you have to wait a little
so that elogd jumps out of the 'select()' statement between the kill
commands. Try:
kill -HUP <pid>; sleep 2; kill <pid>
(I think the 'select()' timeout was 1 second.?) |