You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command line usage involves typing Control-C to interrupt running commands. Duplicati shows the right visual clues, returning the user to the Command Prompt, but its autoupdater design treats the initial process as a launcher for a child process that does the actual work.
The hidden process can result in various surprises depending on what it did. It might hold database open or result in some other conflict. Possible cases of such situations seen in the forum and Issues, however it seems time to put it on the record with its own technical Issue.
Linux (and similar) do well with this, as the terminal sends its SIGINT to the process group, as said in ctrl-c on linux doesn't cancel #1703. Technical details are scattered in man pages such as bash, setpgrp, tcsetpgrp. and tty_ioctl. Windows has different mechanisms.
.NET 6 and beyond provide for PosixSignalRegistration.Create Method which might allow fancy handling, but now that Duplicati tolerates hard kills better than it used to, even having Windows do the same presumed rough kill as Linux does would interrupt the hidden action.
One workaround is a set AUTOUPDATER_Duplicati_SKIP_UPDATE=true but that might interfere with other features you'd rather have on.
Steps to reproduce
Run Duplicati.CommandLine.exe to do something that runs long enough to look around, and produces changes that one can notice.
Press Ctrl-C
Notice the ^C displayed, and Command Prompt readiness to accept another command.
Actual result:
Command continued invisibly.
Expected result:
Command looking killed, was.
Example below could be embellished with dbpath, logfile, etc. if desired. Watch it with Task Manager or Sysinternals Process Monitor.
C:\>"C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" backup file://C:\tmp\dest C:\tree --no-encryption
Backup started at 1/21/2024 9:22:50 AM
Checking remote backup ...
Listing remote folder ...
Listing remote folder ...
Scanning local files ...
0 files need to be examined (0 bytes)
6829 files need to be examined (0 bytes) (still counting)
^C
C:\>"C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" backup file://C:\tmp\dest C:\tree --no-encryption
Backup started at 1/21/2024 9:23:23 AM
ErrorID: DatabaseFormatError
Unable to determine database format: database is locked
database is locked
C:\>
The hidden backup process above can also be noticed because it will be writing files into its destination. Eventually it finishes its backup.
Example with Server:
C:\>"C:\Program Files\Duplicati 2\Duplicati.Server.exe"
^C
C:\>"C:\Program Files\Duplicati 2\Duplicati.Server.exe"
Another instance is running, and was notified
C:\>"C:\Program Files\Duplicati 2\Duplicati.Server.exe"
Another instance is running, and was notified
C:\>
Screenshots
Debug log
The text was updated successfully, but these errors were encountered:
Environment info
Description
Command line usage involves typing Control-C to interrupt running commands. Duplicati shows the right visual clues, returning the user to the Command Prompt, but its autoupdater design treats the initial process as a launcher for a child process that does the actual work.
The hidden process can result in various surprises depending on what it did. It might hold database open or result in some other conflict. Possible cases of such situations seen in the forum and Issues, however it seems time to put it on the record with its own technical Issue.
Linux (and similar) do well with this, as the terminal sends its SIGINT to the process group, as said in ctrl-c on linux doesn't cancel #1703. Technical details are scattered in man pages such as
bash
,setpgrp
,tcsetpgrp
. andtty_ioctl
. Windows has different mechanisms..NET 6 and beyond provide for PosixSignalRegistration.Create Method which might allow fancy handling, but now that Duplicati tolerates hard kills better than it used to, even having Windows do the same presumed rough kill as Linux does would interrupt the hidden action.
One workaround is a
set AUTOUPDATER_Duplicati_SKIP_UPDATE=true
but that might interfere with other features you'd rather have on.Steps to reproduce
^C
displayed, and Command Prompt readiness to accept another command.Command continued invisibly.
Command looking killed, was.
Example below could be embellished with
dbpath
,logfile
, etc. if desired. Watch it with Task Manager or Sysinternals Process Monitor.The hidden backup process above can also be noticed because it will be writing files into its destination. Eventually it finishes its backup.
Example with Server:
Screenshots
Debug log
The text was updated successfully, but these errors were encountered: