~geb/numen

1

Dotool prevention of running multiple matching args dotoolc instances Inbox

Squirrel Modeller <minewpj@gmail.com>
Details
Message ID
<CAP0ZnGYBbSu5HH0PJaht8sbohnuCaK74H3WBBSvTZ72KYukbrg@mail.gmail.com>
DKIM signature
pass
Download raw message
Hello

I really like your project. It is incredibly useful! I was wondering
if you know of an "easy" solution for detecting multiple running
instances of dotool(c). For example:

{ sleep 10; echo type hello; } | dotoolc

In the timespan the instance is running, is it possible to see if any
instances with the same arguments are currently running? This is in
order to make it so if an existing instance with the same arguments is
already running, then we prevent it from running twice. That allows
for executing the command multiple times without having to worry about
the specifics of timing or overlapping command issues.

With dotool, I can just check if an instance is created or not in the
processes. However it seems dotoolc hooks into the dotoold instances
and executes the commands, from what I am guessing. So I am having a
bit of difficulty finding a good solution for this.

Kind regards
Squirrel Modeller
Details
Message ID
<D6BT1BXJJTR1.1XCKKPMPNEJZH@johngebbie.com>
In-Reply-To
<CAP0ZnGYBbSu5HH0PJaht8sbohnuCaK74H3WBBSvTZ72KYukbrg@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
Hello and thanks Squirrel,

dotoolc is really just a simple shell script that writes the actions
to the pipe which dotoold reads, so I'm afraid checking if its still
running probably isn't helpful, as it may terminate well before dotoold
has actually performed the actions.

I can't think of an easy solution to detecting when dotoold has finished
performing an action I'm afraid. It's the first time it's come up.

Sorry that's not much help. Hope you get something that suits working!
John
Reply to thread Export thread (mbox)