Rev: Problem with emacs: crontabs aren't getting installed

trevin trevin@gisol.com
Tue Nov 26 09:44:00 GMT 2002


Jon LaBadie writes:

> On Mon, Nov 25, 2002 at 09:07:16PM +0000, trevin wrote:
>> I've recently installed Cygwin on a Windows 2000 Pro machine.  Installation 
>> was done under a user account.  I tried to install a cron job by running: 
>> 
>> EDITOR=emacs crontab -e  
>> 
>> After reading through the mailing lists on a similar problem, I remembered 
>> to set the variable 'make-backup-files' to nil, and verified that the inum 
>> for the temporary file remained unchanged after saving the file.  However, 
>> when I exit out of emacs, nothing happens.  It returns to the bash prompt 
>> with no messages.  According to crontab -l, the table was not installed.  
>> 
>> Any other ideas what could be wrong? 
> 
> crontab (on unicies anyway) won't install if the editor exits with a
> non-zero status.  Some old vi's used to reflect any error you made
> during editing in a non-zero exit status. 
> 
> You might try to making your EDITOR a shell script "fakeemacs" that contains: 
> 
>   /path/to/real/emacs $*
>   rc=$?
>   echo $rc > /tmp/real_emacs_exit_status
>   exit $rc 
> 
> If this shows in the real_emacs_exit_status file a non-zero value,
> that may be your culprit.  Confirm it by changing the last line to exit 0.

Just to let everybody know, the above suggestion helped me find the real 
culprit: emacs.  emacs was not even exiting properly at all; the 
/tmp/real_emacs_exit_status file never got written out.  Also, the 
/tmp/crontab.* files were never cleaned up.  It appears that emacs *kills* 
its parent when you exit. 

So I downloaded and used the nano editor instead, and it works.  It's not 
crontab's fault; it's a bug in emacs. 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list