Bug 197750

Summary: scp: wrong exit status
Product: Red Hat Enterprise Linux 4 Reporter: Andrew Ernst <redhatbugs>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: urgent Docs Contact:
Priority: medium    
Version: 4.0CC: redhatbugs
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-07 12:21:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Ernst 2006-07-05 22:36:16 UTC
Description of problem:  scp returns non-zero exit statuses under RedHat 4.  The
same commands executed under RHEL 3 and Fedora Core 5 all return 0, but RedHat 4
does not.  This is for copying files locally using scp.


Version-Release number of selected component (if applicable):
openssh-3.9p1-8.RHEL4.12


How reproducible:
Always, under i386 and athlon architectures.

Steps to Reproduce:
1.  mkdir /tmp/t
2.  /usr/bin/scp -v -r /tmp/t /tmp/p; echo $?
  
Actual results:

Executing: cp -r /tmp/t /tmp/p
1

Expected results:

Executing: cp -r /tmp/t /tmp/p
0

Additional info:
Tested this under RHEL 4 on multiple machines, with the same result.

Comment 1 Andrew Ernst 2006-07-06 03:11:17 UTC
I should point out that the exit status is 0 when you copy a file to a remote
host, but not when you copy a file locally:


[user@server tmp]$ scp -r -v /tmp/t /tmp/l; echo $?
Executing: cp -r /tmp/t /tmp/l
1

Comment 2 Tomas Mraz 2006-07-07 12:21:14 UTC

*** This bug has been marked as a duplicate of 190147 ***