monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] mtn automate stdio - change working directory


From: Thomas Keller
Subject: [Monotone-devel] mtn automate stdio - change working directory
Date: Mon, 22 May 2006 23:53:43 +0200
User-agent: Thunderbird 1.5 (X11/20051201)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all!

During my work for guitone I noticed that I eventually need to kill and
restart the mtn automate stdio process, because when I change the
workspace to some other directory, the working directory of the created
and running process still points to the original working directory and
thus most stdio commands return old data. Now, killing, recreating and
starting processes in Qt requires a lot of, let me call it "fancy", code
as it involves sending and handling signals at many places. Something
easy like (pseudo code)

int count = 0
while (still_running() && ++count < 10) {
   send_sigterm();
   sleep(1);
}

while (still_running()) send_sigkill();

to make sure a previous process has been killed and we're reading to
create a new one isn't available/possible there. So, now I thought "why
kill the process at all I could make him change his working directory?"
- - something like

l9changedir:16/new/working/dire


Another possibility would be to parametricize the commands, for example
"inventory" to act on a different working directory:

l9inventory:16/new/working/dire

What do you think? Personally, the first thing (changedir) sounds like
less work. I'm up for trying to implement it if somebody tells me that
this is a reasonable idea, well, if not, bash me for being ignorant, a
newbie, stupid and all =)

Thomas.

- --
Registered Linux User #369861
PGP Public Key on http://thomaskeller.biz/pgp/thomas-keller.pkr
Learn to quote http://netmeister.org/news/learn2quote.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEcjLn9IAC2cFt/voRAgiwAJ412LkfYVxnoZUYAsi7JHkLiDIETgCgnRsG
w9eJ6YL08iW1afhlwU/2Ywg=
=MNYG
-----END PGP SIGNATURE-----




reply via email to

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