Closed GoogleCodeExporter closed 9 years ago
yeah, but isn't this true of all things that install via crontab? there is no
"crontab --add", only read/delete/replace.
Original comment by pub...@kered.org
on 9 Nov 2007 at 3:37
closing since this is an issue w/ crontab.
(comment as to why i'm wrong and i'll reopen)
Original comment by pub...@kered.org
on 10 Nov 2007 at 8:32
[deleted comment]
From the crontab man page: "The specified editor must edit the file in place;
any
editor that unlinks the file and recreates it cannot be used."
It sounds like the recommended approach is to run "crontab -e" and then edit
the
file in place, with appropriate locking to avoid the race condition.
Original comment by staz6...@gmail.com
on 12 Nov 2007 at 1:24
Well, at least here (with vixie cron on Debian Sid) that does not solve
anything.
Open 2 terminals, run crontab -e in each, and have fun with overwriting :(
Additionally, my "man crontab" does not show your line :(
Original comment by zhen...@gmail.com
on 12 Nov 2007 at 1:42
yeah, i can confirm comment #5 here on gusty.
fortunately while usually i'm a real stickler for multithreaded correctness, i
think
this is unlikely to cause any real world problems. we only open it for a
fraction of
a second, and therefore are likely to lose any races that may occur. and since
we
write it on every prefs save, it'll just get updated in the next one.
additionally, my crontab specifically mentions using sed to edit it this way,
which
has exactly the same theoretical problem.
Original comment by pub...@kered.org
on 12 Nov 2007 at 6:46
Original issue reported on code.google.com by
zhen...@gmail.com
on 9 Nov 2007 at 8:08