Mailing List Archive

[Bug 638] scp: wrong exit status
http://bugzilla.mindrot.org/show_bug.cgi?id=638

Summary: scp: wrong exit status
Product: Portable OpenSSH
Version: 3.6.1p2
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: scp
AssignedTo: openssh-bugs@mindrot.org
ReportedBy: koenig@science-computing.de


Hi OpenSSH,

at least both openssh 3.5p1 and 3.6p1 give the wrong exit status 0 (zero)
for "scp", if both source and destination are "remote" and some error
happens (e.g. disk full):


turtle tmp > scp /tmp/BIG1 /tmp/BIG2 ; echo $?
cp: writing `/tmp/BIG2': No space left on device
1

turtle tmp > scp /tmp/BIG1 turtle:/tmp/BIG2 ; echo $?
BIG1 100% |*****************************| 10601 KB 00:01
scp: /tmp/BIG2: No space left on device
1

turtle tmp > scp turtle:/tmp/BIG1 /tmp/BIG2 ; echo $?
BIG1 100% |*****************************| 10601 KB 00:01
/tmp/BIG2: No space left on device
1

turtle tmp > scp turtle:/tmp/BIG1 turtle:/tmp/BIG2 ; echo $?
scp: /tmp/BIG2: No space left on device
==> 0


turtle tmp > ssh -V
OpenSSH_3.6.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090605f


this is running on SuSE Linux 7.2.
openssh binaries have been compiled myself on a RedHat 7.1 system
using gcc-2.95.3 (built myself too).



Harald Koenig



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 638] scp: wrong exit status [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=638





------- Additional Comments From markus@openbsd.org 2003-09-16 05:46 -------
Created an attachment (id=399)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=399&action=view)
check system return code.

could you please try this?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 638] scp: wrong exit status [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=638





------- Additional Comments From koenig@science-computing.de 2003-09-16 18:30 -------
*** Bug 639 has been marked as a duplicate of this bug. ***



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 638] scp: wrong exit status [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=638

koenig@science-computing.de changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED



------- Additional Comments From koenig@science-computing.de 2003-09-16 19:03 -------
Hi Markus,

I've tested your patch with 3.5p1 and it works
for our actual test case and current problem.

thanks for the quick fix !!


Harald.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 638] scp: wrong exit status [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=638

djm@mindrot.org changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |



------- Additional Comments From djm@mindrot.org 2003-09-16 19:13 -------
It is not fixed until the fix is in the tree.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 638] scp: wrong exit status [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=638

markus@openbsd.org changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED



------- Additional Comments From markus@openbsd.org 2003-09-20 08:55 -------
patch applied.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.