Comments (7)
Yeah, I see the same thing: syncthing forks a new process upon launch. I think this is by design. I launched syncthing from command line, and it also spawned two processes.
@enaloha Threads and processes are different things, both can be used for different reasons; and forking new processes is definitely common practice for daemons.
from syncthing-macos.
I can verify this also on my system. They are sub processes of each other so no double syncthing instances are running (multithreaded application). See my activity log screenshot below with detailed process info.
- pid 397 - Syncthing.app started with launchd (osx process launcher)
- pid 398 (process group 398) - syncthing master process
- pid 42535 (process group 398) - syncthing child process (threads)
- pid 398 (process group 398) - syncthing master process
cc @virusman do you agree with this?
from syncthing-macos.
I have observed this issue and I think it might be a bug (or at least a problem). I don't think this has anything to do with multi-threading. These are clearly two processes with individual PIDs (if each app would open a PID for each thread it would be crazy). Anyway, the problem is that whenever Syncthing demon hangs and I need to terminate via the "Quit Syncthing" menu item, the Syncthing app will hang because it cannot shut down both PIDs (only one is closed).
from syncthing-macos.
Yes syncthing-macosx bundle starts syncthing daemon as its child process and are two separated processes. It weird you have to kill syncthing, I have not had any problem with it as long as I'm using my own syncthing-macosx. But you are right it should be "easier to kill". A simple solution doesn't come to my mind yet.
from syncthing-macos.
This is the nature of golang applications, it always spawns minimal two processes. The runtime automatically scales over multiple threads.
from syncthing-macos.
To protect against two running syncthing
daemons spawned from syncthing-macosx
we probably could store a pidfile and try to kill it before starting a new instance (and removing the file). I'm not sure syncthing
daemon will detach from the syncthing-macosx
parent process when something goes wrong. But this needs some investigation and work.
from syncthing-macos.
I'm closing this, as I think it as I have investigated earlier. Its just a sub-process of syncthing. It would also be nice to control the actual start/stop/restart of the subprocess (See #48). Feel free to comment or ask if something is unclear.
from syncthing-macos.
Related Issues (20)
- MacOS spams me with "Background Items Added" HOT 1
- Automatic builds HOT 1
- New installation doesn't show tray icon on macOS 13.2.1 (but is running in the background) HOT 15
- v1.23.4 release please HOT 1
- Unable to login on fresh install did set gui user and password properties in config.xml HOT 11
- Syncthing URI address not correctly updated after test (implicit save), must restart Syncthing HOT 1
- Port change is not reflected in usage of Syncthing (manual restart is needed) HOT 5
- Reset Device ID after new mac setup via Apple's Transfer service HOT 2
- 1.23.7 release HOT 5
- v1.23.7 tagged as v1.27.7, which causes infinite software updates on Sparkle HOT 1
- filename with special characters like ? doesn't maintain their name during sync HOT 3
- Release v1.25.0 HOT 4
- Feature request: move "Check for updates" from About to Preferences HOT 1
- daemon stuck in loop between running and stopped, eventually not running HOT 4
- Bump bundled Syncthing to v1.27.0 HOT 2
- Macos: no automatic scanning HOT 5
- insufficient space on disk for database HOT 4
- ApiKey defaults not in sync with config.xml, autodetect and notify user HOT 8
- Constant but low CPU usage of 0,5% on macOS Sonoma with Syncthing v1.27.3-1 HOT 2
- Override of `syncthing` Executable from .app to custom filesystem path via NSUserDefaults resets always back to bundle path HOT 8
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 syncthing-macos.