1. Introduction 1.1. Project/Component Working Name: Add /usr/xpg4/bin/crontab and /usr/xpg6/bin/crontab 1.2. Name of Document Author/Supplier: Author: Carol Fields 1.3 Date of This Document: 7 November, 2005 4. Technical Description Summary This fasttrack proposes changing the behavior of 'crontab' in response to Bug ID 6344121. The fix will allow crontab to comply with POSIX.2-1992, SUS, SUSv2, SUSv3, and XPG4. This will be done by adding /usr/xpg4/bin/crontab (which invokes /usr/xpg4/bin/vi as the default editor in response to the -e option) and /usr/xpg6/bin/crontab (which invokes /usr/xpg6/bin/vi as the default editor). A Patch release binding is requested for these two additions. The default editor used by /usr/bin/crontab -e will also be changed from ed to vi. The vi used will be the first vi found in $PATH. A Minor release binding is requested for this change. Background IEEE Std 1003.1-2001 describes the following under 'crontab' (similar wording also appears in IEEE Std 1003.2-1992, XPG4, SUS, and SUSv2): "-e Edit a copy of the invoking user's crontab entry, or create an empty entry to edit if the crontab entry does not exist. When editing is complete, the entry shall be installed as the user's crontab entry. "The following environment variables shall affect the execution of crontab: "EDITOR Determine the editor to be invoked when the -e option is specified. The default editor shall be vi." /usr/bin/crontab invokes the editor specified by the environment variable VISUAL, if it is set. If VISUAL is not set, and EDITOR is set, crontab invokes the editor specified by EDITOR. If EDITOR is not set, crontab invokes ed. This behavior complies with the Solaris man page, which states: "-e Edits a copy of the current user's crontab file, or creates an empty file to edit if crontab does not exist. When editing is complete, the file is installed as the user's crontab file. If a username is given, the specified user's crontab file is edited, rather than the current user's crontab file; this can only be done by a user with the solaris.jobs.admin authoriza- tion. The environment variable EDITOR determines which editor is invoked with the -e option. The default edi- tor is ed(1). "EDITOR Determine the editor to be invoked when the -e option is specified. This is overriden by the VISUAL environ- mental variable. The default editor is ed(1). "VISUAL Determine the visual editor to be invoked when the -e option is specified. If VISUAL is not specified, then the environment variable EDITOR is used. If that is not set, the default is ed(1)." Proposal:Description When commands conform to XPG4, they should execute in XPG4 mode, meaning that crontab should exec /usr/xpg4/bin/vi by default. When commands conform to XPG6, they should execute in XPG6 mode, meaning that crontab should exec /usr/xpg6/bin/vi by default. A new /usr/xpg4/bin/crontab and a new /usr/xpg6/bin/crontab will be created for this purpose. There is no mention of the environment variable VISUAL in SUSv3's description of crontab, therefore /usr/xpg4/bin/crontab and /usr/xpg6/bin/crontab will not check VISUAL. If EDITOR is not set in the environment, they will use vi. The behavior of /usr/bin/crontab will be changed to use vi rather than ed. The vi utility used will be the first one found in $PATH. The updated 'crontab' man page is included in the case's final directory. Exported Interfaces Interface Stability --------- --------- /usr/bin/crontab Standard /usr/xpg4/bin/crontab Standard /usr/xpg6/bin/crontab Standard 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: ON 6.5. ARC review type: FastTrack