[comp.unix.xenix.sco] uusched and system time

oli@odbffm.incom.de (Oliver Boehmer) (02/13/91)

I remember hearing about it, but I can't recall where and when:
I'm using SCO-SysV/386 3.2.0.
uusched sometime (mostly during phone-peak hours :-), well who invented
unix? a phone company!) get's the wrong system time and calls up all
systems waiting in the queue.
uucp wrkof  (2/12-15:34:59,17488,7) REMOTE REQUESTED (wrkof!D.odbff33b0bb3 --> odbffm!X.odbffmd33b0 (news))
uucp wrkof  (2/12-15:35:04,17488,8) OK (conversation complete tty1A 635)
uucp wrkof  (2/12-6:59:42,17660,0) SUCCEEDED (call to wrkof )
etc.
Does anybody know about this problem? Is there a bug fix or is this bug
replaced in 3.2.2??
I hope, somebody can help me.... oli
-- 
---------------------------------------------------------------------
Oliver Boehmer, Frankfurt, Germany           oli@odbffm.incom.de
+49-69-331461 (voice) +49-60-308265 (1200/2400)
If God is perfect, why did He create discontinuous functions?

macleod@cmllab.rgb.sub.org (Connor MacLeod) (02/18/91)

In article <1991Feb12.164008.18162@odbffm.incom.de>
oli@odbffm.incom.de (Oliver Boehmer) wrote:

| I'm using SCO-SysV/386 3.2.0.
| uusched sometime get's the wrong system time and calls up all
| systems waiting in the queue.
| Does anybody know about this problem? Is there a bug fix or is this bug
| replaced in 3.2.2??

Well the 3.2.0 rel. had a lot of this time problems. Even cron sometimes
didn't know the right time but that was a bug that didn't show up in
the states I think. This cron-time-bug had to do with the standard/daylight
saving time here in europe...
Anyway. All this nasty bug are fixed in the 3.2v2 rel. of SCO Unix.

Rgds

-- 
Connor MacLeod  <set _aka = 'Uwe Obst'>
 -->========-   <set _adr = '{connor|macleod}@cmllab.rgb.sub.org'>
                <set _rem = 'Don't loose your head !'>
                <set _btw = '"Trust me, I know what I'm doing"--Sledge Hammer'>

a3@rivm.nl (Adri Verhoef) (02/20/91)

>I'm using SCO-SysV/386 3.2.0.
>uusched sometime get's the wrong system time and calls up all
>systems waiting in the queue.
>uucp wrkof  (2/12-15:34:59,17488,7) REMOTE REQUESTED (wrkof!D.odbff33b0bb3 --> odbffm!X.odbffmd33b0 (news))
>uucp wrkof  (2/12-15:35:04,17488,8) OK (conversation complete tty1A 635)
>uucp wrkof  (2/12-6:59:42,17660,0) SUCCEEDED (call to wrkof )
>etc.
>Does anybody know about this problem? Is there a bug fix or is this bug
>replaced in 3.2.2??

This is a cron, uucico and uuxqt problem.  These programs don't have
the TZ-variable set and don't pass $TZ on to the programs that they invoke.
The solution is to set TZ from /etc/TIMEZONE in a new uucico and uuxqt.
Compile the following program with the "-DCICO" and the "-DXQT" cc-flags,
respectively, move the original uucico to .uucico, move the original uuxqt
to .uuxqt, and move the with -DCICO compiled binary to uucico, and move
the with -DXQT compiled binary to uuxqt, and there you go!
-r-xr-xr-x   1 bin      bin         5952 Apr 28  1989 /usr/lib/uucp/uucico
-r-xr-xr-x   1 bin      bin         5948 Apr 28  1989 /usr/lib/uucp/uuxqt

Here is the program:
#!/bin/sh
# This is a shell archive (produced by shar 3.50)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 02/20/1991 11:10 UTC by bin@rivm05
# Source directory /user3/own/sys/uucp/src
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    891 -rw-r----- uuTZ.c
#
# ============= uuTZ.c ==============
if test -f 'uuTZ.c' -a X"$1" != X"-c"; then
	echo 'x - skipping uuTZ.c (File already exists)'
else
echo 'x - extracting uuTZ.c (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'uuTZ.c' &&
/* /usr/lib/uucp/uucico, /usr/lib/uucp/uuxqt
X * A timezone bug - environment variable TZ is not set by uucico, nor by uuxqt -
X * causes time differences by eg. `rmail'.
X * These versions of uucico(1M) and uuxqt(1M) call
X * '.uucico' and '.uuxqt' (which are the original versions), respectively.
X * Note: This is a workaround.
X */
#include <stdio.h>
X
#ifdef CICO
# define REAL_ONE	"/usr/lib/uucp/.uucico"
static char	RIVM_ID[] = "@(#)uucp:uucico	2.0	(a3)	28 apr 1989";
#endif
#ifdef XQT
# define REAL_ONE	"/usr/lib/uucp/.uuxqt"
static char	RIVM_ID[] = "@(#)uucp:uuxqt	2.0	(a3)	28 apr 1989";
#endif
#define TZSIZE	16
X
main(c, v)
char **	v;
{
X	FILE *	pp;
X	char	buf[TZSIZE];
X	char *	p;
X
X	if ((pp = popen(". /etc/TIMEZONE;echo \"TZ=$TZ\"", "r")) != NULL) {
X		if ((p = fgets(buf, TZSIZE, pp)) != NULL) {
X			while (*p && *p != '\n') p++;
X			*p = '\0';
X			putenv(buf);
X		}
X	}
X	execv(REAL_ONE, v);
}
SHAR_EOF
chmod 0640 uuTZ.c ||
echo 'restore of uuTZ.c failed'
Wc_c="`wc -c < 'uuTZ.c'`"
test 891 -eq "$Wc_c" ||
	echo 'uuTZ.c: original size 891, current size' "$Wc_c"
fi
exit 0