1
mirror of https://github.com/rclone/rclone synced 2024-12-22 13:03:02 +01:00
rclone/lib
Michael Hanselmann 6b7d7d0441 atexit: Terminate with non-zero status after receiving signal
When rclone received a SIGINT (Ctrl+C) or SIGTERM signal while an atexit
function is registered it always terminated with status code 0. Unix
convention is to exit with a non-zero status code. Often it's
`128 + int(signum), but at least not zero.

With this change fatal signals handled by the `atexit` package cause
a non-zero exit code. On Unix systems it's `128 + int(signum)` while
on other systems, such as Windows, it's always 2 ("error not otherwise
categorised").

Resolves #5437.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2021-07-07 17:59:26 +01:00
..
atexit atexit: Terminate with non-zero status after receiving signal 2021-07-07 17:59:26 +01:00
bucket doc: fix typos throughout docs and code 2020-05-20 15:54:51 +01:00
buildinfo cmd/version: print os/version, kernel and bitness (#5204) 2021-04-05 21:53:09 +03:00
cache fs/cache: add --fs-cache-expire-duration to control the fs cache 2021-03-30 12:46:47 +01:00
dircache dircache: factor DirMove code out of backends into dircache 2020-06-25 09:41:36 +01:00
encoder encoder/filename: Wrap scsu package 2021-02-12 11:39:39 +00:00
env ftp,sftp: fix docs for usernames 2020-09-27 11:44:05 +01:00
errors build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
exitcode cmd: Move exit status codes to separate package 2021-07-07 17:59:26 +01:00
file config: prevent use of windows reserved names in config file name 2021-04-12 18:17:19 +02:00
http lib/http: add default 404 handler 2021-05-02 11:30:02 +01:00
israce fs/asyncreader: skip some tests to work around race detector bug 2018-08-20 12:34:29 +01:00
jwtutil jwtutil: Fix error handling 2020-04-23 17:52:14 +01:00
mmap build: make rclone build with wasm 2020-08-10 17:32:21 +01:00
oauthutil fs: add names to each config parameter so we can override them #3455 2021-05-14 14:07:44 +01:00
pacer azureblob: add support for managed identities 2020-12-28 13:23:35 +00:00
plugin build: disable lib/plugin under gccgo to make rclone build with gccgo 2020-07-28 09:56:31 +01:00
pool test: Don't run unreliable tests on CI #4171 2020-06-15 21:34:37 +01:00
random test makefiles: add --seed flag and make data generated repeatable #5214 2021-04-12 18:14:01 +01:00
ranges Spelling fixes 2020-10-14 15:21:31 +01:00
readers lib/readers: add NewContextReader to error on context errors 2021-03-29 19:09:47 +01:00
rest lib/rest: fix multipart uploads stopping on context cancel 2021-03-29 19:09:47 +01:00
structs docs: spelling: e.g. 2020-10-28 18:16:23 +00:00
terminal fs: add support for flag --no-console on windows to hide the console window 2021-01-27 18:44:35 +00:00
version b2: fix versions and .files with no extension - fixes #5244 2021-05-17 16:20:29 +01:00