Comments (6)
@ArmorDarks You sure could. Most unix init scripts do just that. (edge cases, but alas!)
Log the process ID of the emitter (or perhaps the parent in which launched it, however you prefer) to a file after forking the chokidar emitter. future executions simply involve a check against this logged PID to decide whether or not to fail and terminate before a further launch.
from chokidar-socket-emitter.
@i8degrees Thanks! Though, wow, that sounded slightly more complicated than it should be...
Anyway, I guess this library isn't maintained anyway, so there little chances that it will be extended or a PR will be accepted, right, @capaj?
from chokidar-socket-emitter.
@ArmorDarks I haven't touched this codebas in quite a while, but I will certainly merge a PR if you make it well. Feel free to update dependencies as well while you're at it.
from chokidar-socket-emitter.
@capaj Thanks for the reply! I'll try to investigate how to do this since I do not have a clear picture yet. @i8degrees give me a good path to watch, but still, there are some things to be figured out...
from chokidar-socket-emitter.
@ArmorDarks nods I thought the same myself for many years! It is actually a rather clever, simple design that is proven the test of time.
-
process management (do it yourself)
- launching a daemon (server) from your own script
- managing the daemon --
chokidar-socket-emitter
-- from its own codebase
-
third-party process management
-
history
I kept this list short, so to try a gentle introduction. You will often find in OSS server distributions a contrib directory that contains process scripts for various platforms. This would be an excellent place to start looking for reference implementation details. Sorry, no distribution name comes to mind, but you'll find a plethora in FreeBSD ports.
Good luck!
P.S. Remember, what is important (generally speaking, perhaps not in your case?) are emitters that you depend on, so that you can keep from touching third-party emitters that may be running. This is one reason how PID lists can be nice.
from chokidar-socket-emitter.
The necessity of disk operation is no-go for me since it will impact our build system performance, which means the harder time during development. But thanks for the lead, I will look into it.
from chokidar-socket-emitter.
Related Issues (16)
- baseURL support HOT 3
- Errors in Windows HOT 2
- Simple Way of Excluding Files / Paths HOT 1
- Exception when client connects with 0.5.0 release HOT 3
- Undefined "package.json". HOT 4
- When chokidar-socket-emitter running via npm it fails HOT 1
- Symlink doesn't trigger change detection HOT 3
- Supplying current socket.io HOT 3
- Allow custom ignore paths for chokidar HOT 2
- default ignored dirs no longer ignored after path resolution HOT 1
- Make logging optional HOT 3
- List all available options in the README.md
- required node version not made clear HOT 2
- Error: watch jspm_packages/npm/[email protected]/lib/__mocks__/fetch.js ENOSPC HOT 3
- CPU spike if jspm_packages is not in root dir
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 chokidar-socket-emitter.