Comments (13)
Yeah, it's both. But in a full crash the exit code can be anything really, for example 128+signal number.
from docs.
The thing is, I didnt treat this exit code as an error in the Android app, which lead to that issue. So the documentation should say that exit code 2 can also mean a crash. And even in a crash, the exit code should never be 0, 3 or 4, right?
from docs.
You'll only ever get exit code 2 in the meaning of "upgrade not available" when running syncthing -upgrade
or syncthing -upgrade-check
specifically. I can't really guarantee what the exit code is or isn't in a crash as at that point someone else (the Go runtime, or the OS) has taken over. I'd be surprised if it was zero, though. For the other codes, does it really matter? Syncthing exited with something that was not the intention to stay shutdown forever, so the action to take is restart it regardless?
from docs.
So how can I check for shutdown, restart or crash in the Android wrapper?
https://github.com/syncthing/syncthing-android/blob/master/src/main/java/com/nutomic/syncthingandroid/service/SyncthingRunnable.java#L152
from docs.
Shutdown is zero. Anything else is a restart or a crash so you restart it. If you want to be more specific, three is an intentional restart and everything else is a crash and thus unintentional restart.
from docs.
I dont want to restart every time, because shutdown is also handled via exit codes. And errors should be reported, so they dont cause an infinite loop. So how about this:
0 -> shutdown
137 -> shutdown (sigkill)
3 -> restart
else -> error
from docs.
Sure, if you prefer. The way our monitor process does it is that it restarts on nonzero exit. If there are four restarts in 15 seconds or so it concludes there is a problem and gives up.
from docs.
Hi,
I'm currently investigating a ticket where the user got exit code 2 unexpectedly. Does that mean it's an upgrade problem or panic in recent syncthing versions? The main.go code says "upgradeNotFound" but upgrades are always off on Android.
from docs.
Check the logs
from docs.
It got lost in crash and it's not my phone, so how?
from docs.
Idk. 2 means upgrade, if it happened in some other case you'd need to get the logs.
from docs.
Okay, maybe the user can provide logs or info if he did try to turn on the non existing upgrade feature in the app. Afaik the web ui doesn't allow turning it on due to compiler switches used during build.
from docs.
You can't switch it on once it was disabled at compile time.
from docs.
Related Issues (20)
- Suggested command on apt site hides error HOT 1
- Failed to start Syncthing!!! HOT 1
- listen address under IPv6
- Caddy V2 reverse proxy HOT 2
- Path relative instead of absolute [API Docs] HOT 1
- Automatic tagging lost? HOT 3
- Incorrect image description for Session mode example
- Remove "syncthing-discosrv"
- How to synchronize between different folders on a device? HOT 1
- The help page for 'automatic upgrades' does not tell one how to re-enable them HOT 7
- Document that Syncthing may need extra permissions to access some paths on macOS HOT 5
- For TrueNas Scale and other Docker installations - Apply fix to the host system
- Better describe what DownloadProgress event actually is/does HOT 3
- class HOT 1
- Tuning article for avoiding any Internet/non-local chatter
- GPG key URL needs updating (Debian install page) HOT 1
- Release signing page references wrong file as signature
- Context/Base path for reverse proxy
- typo: `varibles` → `variables`
- Docs page is down HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.