summaryrefslogtreecommitdiff
path: root/usr.bin/at/at.c
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+4
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* Use nitems() from sys/param.hMarcelo Araujo2016-07-301-1/+1
| | | | | | | Sponsored by: gandi.net (BSD Day Taiwan) Notes: svn path=/head/; revision=303540
* Fix typo: actually test the return of strchr(3)Baptiste Daroussin2016-04-201-1/+1
| | | | | | | | | Reported by: Coverity CID: 1007335 MFC after: 3 days Notes: svn path=/head/; revision=298369
* Sigh, remove a line that needs to be removed along with previous commit.Xin LI2014-09-291-1/+0
| | | | | | | | | Submitted by: mjg MFC after: 3 days X-MFC-with: 272288 Notes: svn path=/head/; revision=272289
* When setting environment variables in the atrun script, use theXin LI2014-09-291-1/+1
| | | | | | | | | | | | | "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) MFC after: 3 days Notes: svn path=/head/; revision=272288
* - Do not bail out if stat(2) fails with ENOENT in the spool directory. ThisPietro Cerutti2013-04-121-2/+26
| | | | | | | | | | | | happens if another atrm process removes a job while we're scanning through the directory. - While at it, optimize a bit the directory scanning, so that we quit looping as soon as all jobs specified in argv have been dealt with. Approved by: cognet Notes: svn path=/head/; revision=249406
* Partially revert r227233.Ed Schouten2011-11-061-2/+2
| | | | | | | | | | | The privs.h header is not only used by at(1), it's also used by atrun(8). Just let the code the way it used to be (for now). Reported by: kwm, tinderbox Hat to: me Notes: svn path=/head/; revision=227269
* Add missing static keywords to at(1).Ed Schouten2011-11-061-8/+6
| | | | | | | | | While there, tidy up the privs.h part, where at.c has to #define to declare some globals. Also group static and non-static global variables in at.c. Notes: svn path=/head/; revision=227233
* Close file and directory descriptorsKevin Lo2010-11-191-0/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=215518
* ANSIfy various tools in usr.bin/.Ed Schouten2010-01-021-1/+1
| | | | | | | | Most of these tools properly build at WARNS=6, except for their K&R function declarations. Fix this, so we can bump WARNS as well. Notes: svn path=/head/; revision=201382
* Use NULL instead of 0 for the return value of fopen().Kevin Lo2007-09-211-2/+2
| | | | | | | Approved by: re (kensmith) Notes: svn path=/head/; revision=172261
* - Use MAXLOGNAME - 1 instead of UT_NAMESIZE.Robert Drehmel2002-07-221-11/+5
| | | | | | | - Do not pretend there is something like '/etc/utmp'. Notes: svn path=/head/; revision=100494
* Add the SUSv3 -l option to at. This is an alias for atq. Allow job idsTim J. Robbins2002-05-161-4/+53
| | | | | | | | | | to be specified on the command line for which information should be reported. Submitted by: Joe Halpin <joe.halpin@attbi.com> Reviewed by: mike Notes: svn path=/head/; revision=96701
* Change whtespace indent in format string to fit new output form ofJun Kuriyama2002-05-081-2/+2
| | | | | | | | | timestamp. Reviewed by: markm Notes: svn path=/head/; revision=96216
* #include <sys/time.h> instead of depending on namespace pollution inBruce Evans2002-02-251-7/+8
| | | | | | | | | | | <sys/stat.h> for the declaration of struct timeval (sys/stat.h> only needs timespecs even when its POSIX support is not turned on, so it shouldn't declare timevals). Fixed some #include messes. Notes: svn path=/head/; revision=91220
* o Remove the -V [version number] option, since our version of at(1) noMike Barcroft2002-01-221-15/+7
| | | | | | | | | | longer resembles the original. o Remove references to `you' in the manual. Submitted by: Joe Halpin <joe.halpin@attbi.com> Notes: svn path=/head/; revision=89633
* Implement the POSIX 1003.1-2001 -r and -t options in at(1). Fix someMike Barcroft2002-01-131-5/+92
| | | | | | | | | | | minor issues in the rest of the source and manual. Submitted by: Joe Halpin <joe.halpin@attbi.com> Obtained from: touch(1) (partially) MFC after: 1 month Notes: svn path=/head/; revision=89315
* Style improvements recommended by Bruce as a follow up to someDavid Malone2001-12-101-1/+0
| | | | | | | | | | | of the recent WARNS commits. The idea is: 1) FreeBSD id tags should follow vendor tags. 2) Vendor tags should not be compiled (though copyrights probably should). 3) There should be no blank line between including cdefs and __FBSDIF. Notes: svn path=/head/; revision=87628
* Use __FBSDID()Mark Murray2001-12-021-4/+3
| | | | Notes: svn path=/head/; revision=87230
* WARNS=2 fixup.Mark Murray2001-12-021-7/+7
| | | | Notes: svn path=/head/; revision=87208
* Remove some unsafe function calls from the signal handlers.Kris Kennaway2001-09-011-6/+14
| | | | | | | | | Obtained from: OpenBSD Reviewed by: audit MFC after: 2 weeks Notes: svn path=/head/; revision=82722
* Expland `mymalloc' with malloc + error checking.David E. O'Brien2001-07-241-13/+4
| | | | Notes: svn path=/head/; revision=80294
* Correct use of .Nm, .Em, .EvPhilippe Charnier1999-12-051-43/+35
| | | | | | | | Add rcsid. Use errx instead of fprintf + exit. Various spelling fixes. Notes: svn path=/head/; revision=54158
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* More egcs warning fixes:Warner Losh1999-04-251-2/+2
| | | | | | | | | | | | | o main returns int not void o use return 0 at end of main when needed o use braces to avoid potentially ambiguous else o don't default to type int o #ifdef 0 -> #if 0 Reviewed by: obrien and chuckr Notes: svn path=/head/; revision=46081
* Eliminate compiler warnings from -WallArchie Cobbs1998-12-061-1/+1
| | | | Notes: svn path=/head/; revision=41556
* atq ignored locale info when printing dates. Is the other call toStephen McKay1998-10-151-1/+5
| | | | | | | | | setlocale() just in the wrong place? PR: 8300 Notes: svn path=/head/; revision=40389
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-2/+2
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Back out MAXLOGNAME fix, Bruce points that copyinstr require NULAndrey A. Chernov1997-03-031-2/+2
| | | | Notes: svn path=/head/; revision=23318
* Fix MAXLOGNAME usage, the code has wrong assumption that it must beAndrey A. Chernov1997-03-021-3/+3
| | | | | | | NULL terminated Notes: svn path=/head/; revision=23300
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23012
* Fix for hard-coded length of login name.David Nugent1997-02-181-3/+11
| | | | | | | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org> Closes #PR bin/2755 Notes: svn path=/head/; revision=22873
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Add setlocale LC_TIMEAndrey A. Chernov1995-10-241-1/+7
| | | | Notes: svn path=/head/; revision=11760
* Upgrade to 2.9Andrey A. Chernov1995-08-211-66/+164
| | | | Notes: svn path=/head/; revision=10154
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-28/+28
| | | | Notes: svn path=/head/; revision=8874
* Remove setre* hacks, we have working thing nowAndrey A. Chernov1995-04-271-1/+7
| | | | Notes: svn path=/head/; revision=8112
* Fight over non-working setruidAndrey A. Chernov1995-04-151-9/+5
| | | | Notes: svn path=/head/; revision=7860
* Upgrade.Andrey A. Chernov1995-04-121-430/+527
| | | | Notes: svn path=/head/; revision=7767
* Added at/atrm/atq/batch from Linux as hacked by Chris Demetriou.Nate Williams1994-01-051-0/+562
Notes: svn path=/head/; revision=941