From owner-freebsd-hackers Sat Jan 18 18:50:43 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id SAA14642 for hackers-outgoing; Sat, 18 Jan 1997 18:50:43 -0800 (PST) Received: from dg-rtp.dg.com (dg-rtp.rtp.dg.com [128.222.1.2]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id SAA14634 for ; Sat, 18 Jan 1997 18:50:40 -0800 (PST) Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA04218; Sat, 18 Jan 1997 21:50:02 -0500 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Sat, 18 Jan 1997 21:50 EST Received: from lakes.water.net (lakes [10.0.0.3]) by ponds.water.net (8.8.3/8.7.3) with ESMTP id VAA09923 for ; Sat, 18 Jan 1997 21:11:46 -0500 (EST) Received: (from rivers@localhost) by lakes.water.net (8.8.3/8.6.9) id VAA01388 for freebsd-hackers@freefall.cdrom.com; Sat, 18 Jan 1997 21:15:22 -0500 (EST) Date: Sat, 18 Jan 1997 21:15:22 -0500 (EST) From: Thomas David Rivers Message-Id: <199701190215.VAA01388@lakes.water.net> To: ponds!freefall.cdrom.com!freebsd-hackers Subject: Re: cron problems in 2.1.6.1 (not signaling crond of a change in a cron Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > As Thomas David Rivers wrote: > > > My question is this: When a new crontab entry is installed in the > > system, should you have to do something to crond to get it recognized? > > It should be picked up automatically based on the modification > timestamp of the crontab file: > > u = find_user(old_db, fname); > if (u != NULL) { > /* if crontab has not changed since we last read it > * in, then we can just use our existing entry. > */ > if (u->mtime == statbuf->st_mtime) { > Debug(DLOAD, (" [no change, using old data]")) > unlink_user(old_db, u); > link_user(new_db, u); > goto next_crontab; > } > > -- > cheers, J"org > Aha! That's what didn't work - apparently. find_user() appears to only look for existing users. If you're adding a brand-new user crontab; it seems to be broken. I did see the appropriate readdir() on "tabs" - which eventually worked its way down to the code you quote... looks reasonable to me as well. I've just noted that it doesn't work :-) It's not a bigee - as a restart of cron fixes the problem, if I get time I'll try and debug it and see what's going on. - Dave Rivers -