No I don't have any control of the subroutine because
thatz inside a module called Quota
-Arijit
world.com> wrote:
> Hi Arijit,
>
> As far as I'm aware SIGnals are the only generic
> mechanism you can use to jump out of code from any
> point of execution...
>
> So without knowing the contents of the subroutine
> you're running it's not easy to suggest a way for it
> to work. Perhaps you could post that subroutine?
>
> Is it doing any 'blocking' activities? Coudl there
> be
> an external factor involved in this subroutine
> taking
> a long time intermittently?
>
> Marty
>
>
> --- Arijit Das <[EMAIL PROTECTED]> wrote:
>
> > How can I time out a subroutine/function?
> >
> > print "My code is executing...the next sub
> inokation
> > takes a long time simetimes. SO, I want to ensure
> > that
> > at max it should take 5 secsonds.";
> > my $device_name = Quota::getqcarg($path);
> >
> >
> > I want to timeout Quota::getqcarg($path) but I
> don't
> > want to use the $SIG{ALRM} technique because I am
> > using a older version of Perl which doesn't
> support
> > safe/defferred signals.
> >
> > Is there any other technique by which I can achive
> > this timeout?
> >
> > Thanks,
> > Arijit
> >
> >
> >
> >
> ____________________________________________________
> > Start your day with Yahoo! - make it your home
> page
> > http://www.yahoo.com/r/hs
> >
> > _______________________________________________
> > Perl-Unix-Users mailing list
> > [email protected]
> > To unsubscribe:
> > http://listserv.ActiveState.com/mailman/mysubs
> >
>
>
>
>
>
>
>
___________________________________________________________
>
> Yahoo! Messenger - NEW crystal clear PC to PC
> calling worldwide with voicemail
> http://uk.messenger.yahoo.com
>
Arijit Das
Infosys Technologies Ltd.
Mangalore - 575 006, India
Cell Phone: 9448135200
E-Mail: [EMAIL PROTECTED]
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
_______________________________________________
Perl-Unix-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs