On Fri, 2007-12-14 at 18:24 -0500, Ming Zhang wrote: > What should be the right exit code for vanished file in this scenario. > > (1) Use inotify or other mechanism to check changed files and then > generate a file list. > > (2) < file get deleted> > > (3) run rsync with --files-from with the old list. > > then send_file_list()->link_stat() will return errno 2 on some files and > then set exit code to 23. > > but shall rsync return 24?
This issue has come up before: http://lists.samba.org/archive/rsync/2007-November/019177.html Code 23 is correct according to the current interpretation of --files-from, namely that the user intends to have each and every listed file copied and wants rsync to raise a red flag if one is missing. I agree that different behavior (probably enabled by an option) would be useful when passing --files-from lists from inotify. I'm not sure that even code 24 is in order because the nonexistence of a --files-from entry cannot affect the correctness of a run with --delete in the way that a traditional vanishing can. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
