[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

create delay loop in ruby?

Xx Xx

12/18/2008 2:35:00 PM

i am trying to run an executable file(say a.exe) which will produce a
a.log once finish.so i create the algo below to analyze the log file.

if(a.exe exist)
execute a.exe

if(a.log exist)
analyze a.log
end
end

but, my thinking is the checking for a.log exist will be done way before
the a.exe is finished.

any workaround for my problem? i was thinking of using a delay(if can)
though it is not so reliable....
--
Posted via http://www.ruby-....

3 Answers

Robert Klemme

12/18/2008 2:57:00 PM

0

2008/12/18 Xx Xx <limhuisian@hotmail.com>:
> i am trying to run an executable file(say a.exe) which will produce a
> a.log once finish.so i create the algo below to analyze the log file.
>
> if(a.exe exist)
> execute a.exe
>
> if(a.log exist)
> analyze a.log
> end
> end
>
> but, my thinking is the checking for a.log exist will be done way before
> the a.exe is finished.
>
> any workaround for my problem? i was thinking of using a delay(if can)
> though it is not so reliable....

Just invoke the process synchronously, e.g. via "system".

robert


--
remember.guy do |as, often| as.you_can - without end

Mulligan

5/2/2013 1:25:00 PM

0

On May 2, 9:22 am, A Really Really Large Number <t2judgm...@gmail.com>
wrote:
> On May 2, 9:19 am, A Really Really Large Number <t2judgm...@gmail.com>
> wrote:
>
>
>
>
>
> > On May 2, 9:15 am, A Really Really Large Number <t2judgm...@gmail.com>
> > wrote:
>
> > >http://www.cnn.com/2013/05/02/world/meast/syria-civil-war/...
>
> > > Syrian Information Minister Omran al-Zoubi said in an exclusive
> > > interview with CNN that a hard-line Islamist rebel group has used
> > > chemical weapons in the civil war and his government "would never use"
> > > such munitions "if we had them."
>
> >http://www.nytimes.com/2012/07/24/world/middleeast/chemical......
>
> > BEIRUT, Lebanon — Syrian officials warned Monday that they would
> > deploy chemical weapons against any foreign intervention, a threat
> > that appeared intended to ward off an attack by Western nations while
> > also offering what officials in Washington called the most “direct
> > confirmation” ever that Syria possesses a stockpile
>
> > The warning came out of Damascus, veiled behind an assurance that the
> > Syrian leadership would never use such weapons against its own
> > citizens
>
> > “Any stock of W.M.D. or unconventional weapons that the Syrian Army
> > possesses ...
>
> > Asked whether Syria was finally acknowledging that it had chemical
> > weapons, Mr. Makdissi repeated roughly the same response, but began it
> > by saying that any stock of unconventional weapons or chemical weapons
> > “if they exist” would not be used domestically, but would be used
> > against foreign intervention.
>
> http://www.nytimes.com/2012/07/24/world/middleeast/chemical......
>
> A United Nations diplomat said that in a meeting this month with Kofi
> Annan, the special envoy for Syria and former United Nations secretary
> general, President Bashar al-Assad had also said that any chemical
> weapons were stored in a safe place.
>
> Mr. Assad also told Mr. Annan that they would not be used except in
> the case of foreign invasion, the diplomat said, speaking on condition
> of anonymity because of the diplomatic delicacy of the topic.

http://en.rian.ru/russia/20121222/1783...

MOSCOW, December 22 (RIA Novosti) - Chemical weapons are under the
control of the Syrian government, which has consolidated them in one
or two locations, Russian Foreign Minister Sergei Lavrov said on
Saturday.

“As of right now… the [Syrian] government is doing all it can to
safeguard those weapons,” he said.

Mulligan

5/2/2013 1:32:00 PM

0

On May 2, 9:25 am, A Really Really Large Number <t2judgm...@gmail.com>
wrote:
> On May 2, 9:22 am, A Really Really Large Number <t2judgm...@gmail.com>
> wrote:
>
>
>
>
>
> > On May 2, 9:19 am, A Really Really Large Number <t2judgm...@gmail.com>
> > wrote:
>
> > > On May 2, 9:15 am, A Really Really Large Number <t2judgm...@gmail.com>
> > > wrote:
>
> > > >http://www.cnn.com/2013/05/02/world/meast/syria-civil-war/...
>
> > > > Syrian Information Minister Omran al-Zoubi said in an exclusive
> > > > interview with CNN that a hard-line Islamist rebel group has used
> > > > chemical weapons in the civil war and his government "would never use"
> > > > such munitions "if we had them."
>
> > >http://www.nytimes.com/2012/07/24/world/middleeast/chemical.......
>
> > > BEIRUT, Lebanon — Syrian officials warned Monday that they would
> > > deploy chemical weapons against any foreign intervention, a threat
> > > that appeared intended to ward off an attack by Western nations while
> > > also offering what officials in Washington called the most “direct
> > > confirmation” ever that Syria possesses a stockpile
>
> > > The warning came out of Damascus, veiled behind an assurance that the
> > > Syrian leadership would never use such weapons against its own
> > > citizens
>
> > > “Any stock of W.M.D. or unconventional weapons that the Syrian Army
> > > possesses ...
>
> > > Asked whether Syria was finally acknowledging that it had chemical
> > > weapons, Mr. Makdissi repeated roughly the same response, but began it
> > > by saying that any stock of unconventional weapons or chemical weapons
> > > “if they exist” would not be used domestically, but would be used
> > > against foreign intervention.
>
> >http://www.nytimes.com/2012/07/24/world/middleeast/chemical......
>
> > A United Nations diplomat said that in a meeting this month with Kofi
> > Annan, the special envoy for Syria and former United Nations secretary
> > general, President Bashar al-Assad had also said that any chemical
> > weapons were stored in a safe place.
>
> > Mr. Assad also told Mr. Annan that they would not be used except in
> > the case of foreign invasion, the diplomat said, speaking on condition
> > of anonymity because of the diplomatic delicacy of the topic.
>
> http://en.rian.ru/russia/20121222/1783...
>
> MOSCOW, December 22 (RIA Novosti) - Chemical weapons are under the
> control of the Syrian government, which has consolidated them in one
> or two locations, Russian Foreign Minister Sergei Lavrov said on
> Saturday.
>
> “As of right now… the [Syrian] government is doing all it can to
> safeguard those weapons,” he said.

http://www.aljazeera.com/news/middleeast/2012/12/2012122215320...

Syria has consolidated its chemical weapons stocks in one or two
locations as rebels make advances in several parts on the country,
said Russia's foreign minister.

Sergei Lavrov said Russia, which reportedly has military advisers
training Syria's military, has kept close watch over its chemical
arsenal.

He said the Syrian government had transferred weapons from several
arsenals to just "one or two centres" to properly safeguard them.
Israeli officials have also said that Syrian chemical weapons were
under control