[Bug 14126] New: The atomic-rsync script can exit 0 when the operation failed.
samba-bugs at samba.org
samba-bugs at samba.org
Fri Sep 13 22:41:27 UTC 2019
https://bugzilla.samba.org/show_bug.cgi?id=14126
Bug ID: 14126
Summary: The atomic-rsync script can exit 0 when the operation
failed.
Product: rsync
Version: 3.1.3
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5
Component: core
Assignee: wayne at opencoder.net
Reporter: cmb at prgmr.com
QA Contact: rsync-qa at samba.org
Created attachment 15469
--> https://bugzilla.samba.org/attachment.cgi?id=15469&action=edit
patch for the issue
The atomic-rsync script uses the call "exit $?" on a failed system()
invocation.
$? is a 16-bit wait status, and exit() expects an 8-bit integer.
The lower 16 bits are used as the exit status.
For instance, if the called program exits 1, $? is 256, with 1 in the high 8
bits.
In this situation atomic-rsync exits 0, but the operation failed.
I made a patch. Now it just exits 1 without trying to pass the child's status.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the rsync
mailing list