[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] race condition on mtn automate stdio startup

From: Stephen Leake
Subject: [Monotone-devel] race condition on mtn automate stdio startup
Date: Fri, 18 Dec 2009 04:03:18 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt)

I've just run across a race condition in mtn automate stdio.

During the startup of the command, it checks for various error
conditions, such as having a database specified. This can fail if the
user is not actually in a workspace:

bash-3.00$ mtn automate stdio
mtn: misuse: no database specified

On the other hand, if there are no errors, there is no output; the
process is waiting for the next user command:

bash-3.00$ cd gpm
bash-3.00$ mtn automate stdio

(killed with C-c)

This is race condition; my Emacs front-end has to wait for "a while"
to tell if the mtn process got started ok, before sending the first

I have not looked into possible fixes for this. Perhaps with the new
out-of-band facility, there could be a "ready for first command"
message at startup?

-- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]