In perl, the alarm function can be used to prevent timeouts. This is useful in, for example, CGI scripts where you run the risk of having the browser timeout the connection.

First off you need to set up the alarm with something like

$| = 1;                           #  force autoflush
use constant ALARM_TIME => 15;    # seconds between alarm signals
$SIG{ALRM} = sub { print "."; alarm ALARM_TIME; }

then later on in your script, you turn the alarm on before the process that times out is called.

alarm 1; # turn on alarm [...] # some process that takes forever to run alarm 0; # turn off alarm

See the perlfunc and perlipc man pages for more information.

An air to surface missile, the Air-Launched Anti-Radar Missle or ALARM was designed by British Aerospace. It was originally ordered by the Ministry of Defence in 1983 and, as is usual with defence contracts, took an age to be delivered. ALARM finally went into active service in 1990, in time for the Gulf War where it was one of the most effective weapons.

Ground based radar operators turn off their transmitters once approaching aircraft have been spotted, before any conventional anti-radar missiles can be launched. A fire and forget missile, ALARM gets round this in a unique way. Once launched, it rises to around 40,000 feet, shuts down its engines and deploys a parachute. It then descends slowly, all the while monitoring a large area with its passive radar seeker. Once any aircraft have disappeared, radar operators would turn their installation on again, ALARM then spots the radar signal (a mighty "Over Here"), and locks on, jettisons the parachute and restarts its engine. ALARM can then home in on the target, remembering the location even if the operator turns off transmissions again.

Modern warfare demands air superiority. In the Gulf War it was the RAF Tornado and Jaguar based ALARM that helped force the Iraqi radar sites to stop transmitting, or be destroyed, thus helping to secure free passage for the Allied aircraft.

A*larm" (#), n. [F. alarme, It. all' arme to arms ! fr. L. arma, pl., arms. See Arms, and cf. Alarum.]

1.

A summons to arms, as on the approach of an enemy.

Arming to answer in a night alarm. Shak.

2.

Any sound or information intended to give notice of approaching danger; a warming sound to arouse attention; a warning of danger.

Sound an alarm in my holy mountain. Joel ii. 1.

3.

A sudden attack; disturbance; broil.

[R.] "These home alarms."

Shak.

Thy palace fill with insults and alarms. Pope.

4.

Sudden surprise with fear or terror excited by apprehension of danger; in the military use, commonly, sudden apprehension of being attacked by surprise.

Alarm and resentment spread throughout the camp. Macaulay.

5.

A mechanical contrivance for awaking persons from sleep, or rousing their attention; an alarum.

Alarm bell, a bell that gives notice on danger. -- Alarm clock or watch, a clock or watch which can be so set as to ring or strike loudly at a prearranged hour, to wake from sleep, or excite attention. -- Alarm gauge, a contrivance attached to a steam boiler for showing when the pressure of steam is too high, or the water in the boiler too low. -- Alarm post, a place to which troops are to repair in case of an alarm.

Syn. -- Fright; affright; terror; trepidation; apprehension; consternation; dismay; agitation; disquiet; disquietude. -- Alarm, Fright, Terror, Consternation. These words express different degrees of fear at the approach of danger. Fright is fear suddenly excited, producing confusion of the senses, and hence it is unreflecting. Alarm is the hurried agitation of feeling which springs from a sense of immediate and extreme exposure. Terror is agitating and excessive fear, which usually benumbs the faculties. Consternation is overwhelming fear, and carries a notion of powerlessness and amazement. Alarm agitates the feelings; terror disorders the understanding and affects the will; fright seizes on and confuses the sense; consternation takes possession of the soul, and subdues its faculties. See Apprehension.

 

© Webster 1913.


A*larm", v. t. [imp. & p. p. Alarmed (#); p. pr. & vb. n. Alarming.] [Alarm, n. Cf. F. alarmer.]

1.

To call to arms for defense; to give notice to (any one) of approaching danger; to rouse to vigilance and action; to put on the alert.

2.

To keep in excitement; to disturb.

3.

To surprise with apprehension of danger; to fill with anxiety in regard to threatening evil; to excite with sudden fear.

Alarmed by rumors of military preparation. Macaulay.

 

© Webster 1913.

Log in or registerto write something here or to contact authors.