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

martin
Site Admin
martin avatar
Joined:
Posts:
29,266
Location:
Prague, Czechia

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

This issue has been added to the tracker:
https://winscp.net/tracker/1404

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,266
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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,266
Location:
Prague, Czechia

Thanks again for your assistance.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum