Topic "CTRL-C during a script "synchronize" results in exit-code 0"

Author Message
stefan_s
[View user's profile]

Joined: 2007-09-18
Posts: 15
Location: munich, germany
winscp.exe 5.7.6

if a CTRL-C is pressed in a console Window during a script
the exit code '0' is returned, but not all files are transferred.

script: .. "option batch abort" "synchronize remote -mirror ..."
Log-File: "Script: Terminated by user."
XMl-Log: no info, all files (up to ctrl-c): result success="true"

An exit-code e.g. '2' and/or an entry in the XML-log
(last filename result: "cancelled")
for this would be great.

"Closing" the console window by mouse, result in return code !=0.
but the caller prog sees: "return: -1073741510"
Is this random or intentional?

A reliable exit code of '0' only when script completes until end, would be
helpful.

not calling with "/console" would prevent to allow CTRL-C, but
will not show any progress.
Tried: "/nointeractiveinput" to prevent CTRL-C, but still possible.

Log end with CTRL-C:

< 2016-02-26 10:55:01.671 Type: SSH_FXP_STATUS, Size: 24, Number: 11014
< 2016-02-26 10:55:01.671 Script: Terminated by user.
< 2016-02-26 10:55:01.671 Type: SSH_FXP_STATUS, Size: 24, Number: 11268
< 2016-02-26 10:55:01.671 Status code: 0
. 2016-02-26 10:55:01.671 Preserving timestamp [2011-12-15T14:43:34.000Z]
< 2016-02-26 10:55:01.671 Type: SSH_FXP_STATUS, Size: 24, Number: 10761
< 2016-02-26 10:55:01.671 Status code: 0
. 2016-02-26 10:55:01.671 Transfer done: 'F:\ecg\00000008.ecg' [31782]
. 2016-02-26 10:55:01.671 Script: Exit code: 0
. 2016-02-26 10:55:01.671 Closing connection.
. 2016-02-26 10:55:01.671 Sending special code: 12
. 2016-02-26 10:55:01.671 Sent EOF message

caller see return code: '0'

log console closed by mouse:
...
. 2016-02-26 10:57:19.596 Copying "F:\ecg\0000000c.ecg" to remote directory started.
. 2016-02-26 10:57:19.596 Binary transfer mode selected.
. 2016-02-26 10:57:19.596 Opening remote file.
> 2016-02-26 10:57:19.596 Type: SSH_FXP_OPEN, Size: 79, Number: 10243
< 2016-02-26 10:57:19.642 Type: SSH_FXP_HANDLE, Size: 13, Number: 10243
> 2016-02-26 10:57:19.642 Type: SSH_FXP_WRITE, Size: 29955, Number: 10758
> 2016-02-26 10:57:19.642 Type: SSH_FXP_CLOSE, Size: 13, Number: 11012

caller see return code: '-1073741510'


please let me know if you need more info / full logfiles.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
This issue has been added to the tracker:
http://winscp.net/tracker/show_bug.cgi?id=1404

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
stefan_s
[View user's profile]

Joined: 2007-09-18
Posts: 15
Location: munich, germany
yes, this version returns 1 on CTRL-C

a <failure> entry in XML-logfile would be great.

many thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
This issue has been added to the tracker:
http://winscp.net/tracker/show_bug.cgi?id=1406

I'm sending you an email with a new development version of WinSCP.
stefan_s
[View user's profile]

Joined: 2007-09-18
Posts: 15
Location: munich, germany
this version's XML msg is fine

many thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Thanks for your feedback.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Actually I had to re-implement it to avoid undesired side-effects.
Please re-test the new build, I'm sending you.
stefan_s
[View user's profile]

Joined: 2007-09-18
Posts: 15
Location: munich, germany
the new version works also fine.
no visible change

thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Thanks again for your assistance.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License