Check if mutex get started and closed

Shiroyashaxdd Source

Currently i'm running a node.js webserver and my goal is to start a function that checks if a mutex(created by a program in c) gets started or get closed. If it gets started the javascript should do something and if it gets closed it should stop doing w/e he is doing at the moment.
Basically it should run like that :
User clicks a button on a HTML page -> node.js starts an server sided script -> Run a cmd command thought javascript( a C programm) -> script detects that a mutex got started and pause -> script detects mutex got closed and continue doing stuff.
Hopefully my question is lear enought. Is it possible detecting a mutex created by an external program with the help of javascript? Extern libaries are fine aswell!



comments powered by Disqus