Giter Club home page Giter Club logo

Comments (6)

i8degrees avatar i8degrees commented on August 24, 2024

@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.

ArmorDarks avatar ArmorDarks commented on August 24, 2024

@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.

capaj avatar capaj commented on August 24, 2024

@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.

ArmorDarks avatar ArmorDarks commented on August 24, 2024

@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.

i8degrees avatar i8degrees commented on August 24, 2024

@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.

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.

ArmorDarks avatar ArmorDarks commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.