Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2001 01:12:18 -0500 (EST)
From:      Alan E <alane@geeksrus.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/32242: patch to allow 'at now' to queue a job for immediate execution
Message-ID:  <200111240612.fAO6CI900808@wwweasel.geeksrus.net>

next in thread | raw e-mail | index | archive | help

>Number:         32242
>Category:       bin
>Synopsis:       patch to allow 'at now' to queue a job for immediate execution
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 23 22:20:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Alan E
>Release:        FreeBSD 4.4-RELEASE i386
>Organization:
Geeksrus.NET
>Environment:
System: FreeBSD wwweasel.geeksrus.net 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Sun Oct 28 04:44:34 EST 2001 root@wwweasel.geeksrus.net:/usr/src-4.4-RELEASE/sys/compile/WWWEASEL i386
>Description:

1. 'at now + 1 minute' is allowed.

2. 'at now + 0 minutes' is rejected with 'trying to travel back in time'; 
   that's a different PR.
   
3. 'at now' is intuitive, and I can't think of a good reason to disallow it.

>How-To-Repeat:

Try 'echo foo | at now'. 

>Fix:

--- parsetime.c.or	Wed Aug  1 20:55:58 2001
+++ parsetime.c	Sat Nov 24 00:47:54 2001
@@ -579,7 +579,11 @@
     init_scanner(argc-optind, argv+optind);
 
     switch (token()) {
-    case NOW:	/* now is optional prefix for PLUS tree */
+    case NOW:	
+            if (scc < 1) {
+                    return nowtimer;
+            }
+	    /* now is optional prefix for PLUS tree */
 	    expect(PLUS);
     case PLUS:
 	    plus(&runtime);
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111240612.fAO6CI900808>