Hi! It seems like vim and busybox's crontab don't get along. :D Basically, any changes that are being made within the vim editor are not preserved after the editor finishes. I quickly looked into source and it looks like, somehow, bb_copyfd_eof() copies the old contents of the crontab.pid file instead of the one that's been saved - so the end result is that the crontab file is not changed at all. (I tried to do some dirty patching like to re-open the src_fd right before the copyfd is called and that way new_fname got all the changes).
Since I noticed that this doesn't seem to be a problem when you edit the crontab file with busybox's vi or nano, I don't really know if it's a strictly busybox's crontab problem (just thought I will drop it here to see if anyone's seen something similar or has some ideas on what's the actual problem). Issue seen with busybox 1.24.1 and 1.30.1 used with Debian's (stretch) vim package (8.0) (I don't have an output from strace but can attach it later on if needed). Btw, I also noticed that sendfile() complains returns EINVAL when it's used for read|writitng the data between fds in this scenario - I can only guess it's because O_APPEND is in use (according to sendfile's man it's not supported). Regards, Michal
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
