This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crontab on Win9X works


Corinna Vinschen wrote:
> 
> On Mon, Apr 14, 2003 at 10:44:23PM -0400, Pierre A. Humblet wrote:

> > The change in env.c reverts to ignoring the daemon environment,
> > on Win9x only.
> 
> Why?

For the same reason as the original cron does it, I guess.
On Win9X it is typically a large user environment, including functions
in the case of bash. On NT it is only the small service environment.
Also the functions screw up the mail headers (because "}>" isn't a valid 
mail header), as in
******************************
X-Cron-Env: <WINDOWID=168105192>
X-Cron-Env: <_=./cron>
X-Cron-Env: <fontpath=() {  xset fp+ /ust/lib/X11/fonts/75dpi
Date: Mon, 14 Apr 2003 18:20:00 -0400

}>
X-Cron-Env: <rm=() {  command rm -i "$@"
}>
X-Cron-Env: <xfig=() {  command xfig -latexfonts -specialtext -pwidth 8 
  -pheight 7 -but_per_row 3 +-startgridmode 1 -startposnmode 1 $* &
}>
**********************************

> > USE_SIGCHLD is now left undefined in compat.h to get
> > rid of a syslog message about the mail command failing.
> 
> Why?  Isn't a syslog message what we want if the mail command fails?

The message will be there if needed. Currently it can be there even
when mail succeeds (wait() can return -1). 
  
> > In addition I would like to allow the use of mailers other
> > than ssmtp while preserving current installations.
> > This is done by patching compat.h to remove
> > #define _PATH_SENDMAIL  "/usr/sbin/ssmtp"
> > and patching /etc/postinstall/cron.sh to
> > ln -s /usr/sbin/ssmtp.exe /usr/sbin/sendmail
> > Users are free to point /usr/sbin/sendmail as they wish.
> 
> That's fine, too.

Just had a cup of coffee and I noticed in my cron.sh:
- it's silly to check if /usr/sbin exists because that's where
cron.exe was installed.
- it's safer to link /usr/sbin/ssmtp (without .exe).
 
> Could you please add a matching ChangeLog entry for cron.README?

3.0.1-9:
--------

The mail command is /usr/sbin/sendmail, which is a symlink preset to 
/usr/sbin/ssmtp . Prevent unnecessary syslog messages.
On Win9x, do not propagate the environment (see 3.0.1-3) and have crontab.exe
touch the file /etc/crontab instead of the directory /var/cron/tabs.

Pierre

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]