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

Advertisement

stefan_s
Joined:
Posts:
18
Location:
munich, germany

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

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.

Reply with quote

Advertisement

Advertisement

martin
Site Admin
martin avatar

Actually I had to re-implement it to avoid undesired side-effects.
Please re-test the new build, I'm sending you.

Reply with quote

Advertisement

You can post new topics in this forum