[Vienna-pm] alarm signalhandling
franz schaefer
schaefer at mond.at
Wed Sep 26 05:10:31 PDT 2007
> Leider scheitere ich sowohl mit
>
> $SIG{ALRM} = \&timeout(&stop_services);
> als auch mit
> $SIG{ALRM} = \&timeout('stop_services'); # und no strict 'refs'
>
> in der Weise, dass die Alarm-Aktion sofort durchgeführt wird
> ohne auf's Timeout zu warten.
weil du es ja auch gleich ausfuehrst.
du koenntest z.b.:
$SIG{ALRM} = sub { timeout('argumente'); }
schreiben. dann generierst du eine anonyme funktion die die funktion timeout
mit den gewuenschten parametern aufruf wenn sie aufgerufen wird..
lg mond.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. Franz Schaefer GPG KeyID: CFA2F632
.. +43 699 106 14 590 +43 720502048 Fingerprint: 57C2 C0CC
... schaefer at mond.at 6F0A 54C7 0D88 D37E
... http://www.mond.at/ C17C CB16 CFA2 F632
More information about the Vienna-pm
mailing list