Subject: Re: at(1), atrun(8) problems: is it just me?
To: NetBSD/Alpha <>
From: B. James Phillippe <>
List: port-alpha
Date: 06/06/2002 00:37:19
On the dignified day of Jun 5, B. James Phillippe penned:

> Hello,
> I'm having trouble with at/atrun on NetBSD-1.5.2/alpha.  I can create at
> jobs and they are removed by atrun (through crond), but they do not
> execute.  If I list them with "-c job", they look fine.  They just don't
> seem to be exec()'d properly.

Sorry to respond to my own post, but I did discover the problem and it is a
bug in atrun.  It only shows up on 64-bit RISC and when
machdep.unaligned_sigbus=1 -- which just happens to be my setup. :-)

The tiny diff is shown here:

--- atrun.c.orig	Thu Jun  6 00:30:57 2002
+++ atrun.c	Thu Jun  6 00:31:13 2002
@@ -230,7 +230,7 @@
 	(void)fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
 	(void)snprintf(fmt, sizeof(fmt),
-	    "#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d",
+	    "#!/bin/sh\n# atrun uid=%%u gid=%%u\n# mail %%%ds %%d",
 	if (fscanf(stream, fmt, &nuid, &ngid, mailbuf, &send_mail) != 4) {
 		syslog(LOG_ERR, "File %s is in wrong format - aborting",

# bryan_at_darkforest_dot_org
# Software Engineer