Jump to content


Photo
- - - - -

Function Timeout


18 replies to this topic

#1 Luke Neethling

Luke Neethling

    Member

  • Members
  • PipPip
  • 17 posts
  • Gender:Male
  • Location:Roodepoort, South Africa

Posted 29 November 2002 - 01:10 PM

Has anyone used the function timeout facility.

I have tried it and does not seem to work as I thought. When setting @TIMEOUT = 5, @TFUNCT = '@MAIN', this means the function will timeout in 5 minutes and exit to function @MAIN. However the function will only timeout if user intervention is done by the user pressing any key.

I would think that pro-iv would exit this function without any user intervention.
Could someone please help.

#2 Chris Pepper

Chris Pepper

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:United Kingdom

Posted 29 November 2002 - 03:47 PM

I've used it and it works in the manner you suggest.

Since hardly anyone uses it and it can prevent people entering data if a screen is left unattended then at least it does something. But what about releasing locks etc.

As a test for those on the board how could it be improved... it seems a bit difficult without making the system less efficient.

One idea would be to implement it a client level - then the client would disconnect after a specified period.

At server level you'd either have to have a separate daemon monitoring the system or have an interupt driven timer - so you wait for input and staart the timer, then reset it when you get the next input. I'm not a 'C' programmer, how efficient would this be?

#3 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 29 November 2002 - 05:45 PM

Purely in terms of C programming and without considering what would make sense in ProIV:

The alarm function, which is..
unsigned int alarm(unsigned int secs)
..sets up an alarm to trigger after secs seconds.

At that time (unless the program cancels the alarm in the meantime), the SIGALRM signal will be raised.

Assuming you have registered a handler function for the SIGALRM signal, any regular code which is executing when the alarm occurs will be rudely interrupted and your handler code will be executed. Without a handler, your program would terminate (by default anyway).

This is all very efficient stuff, indeed some of it may be happening in hardware. But, programming with signals and signal-handlers can be very subtle and is a frequent source of error!
Nothing's as simple as you think

#4 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 30 November 2002 - 02:08 AM

Hi,

I used the timeout at my last place.

We set it to 30 minutes, and @TFUNCT to 'OFF'.

We had a system with 500-600 users, so logging off idle users was required to keep the system resources down.

We only had it set for menus and certain screens. Each menu would set the timeout in 'logic in' and reset it in 'logic out'. We also had some key area lookup screens that we did the same with.

Rob D.

#5 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 01 December 2002 - 02:03 PM

Rob,

I've never used this but you seem to suggest that it DOES log users off unilaterally after the specified time (otherwise it wouldn't conserve resources right?)

However, Luck and Chris seem to say it doesn't ACTUALLY terminate a 'timed-out' process until someone comes along and presses another key?

So I'm a bit confused - was it your experience that the ProIV process shut down after 30 minutes without anyone touching the keyboard?
Nothing's as simple as you think

#6 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 01 December 2002 - 02:22 PM

Yep, it used to timeout without the users pressing any keys. The 'pro' process terminated and exited fine.

We were using Compaq Tru64 Unix, maybe its works on that platform.

Also, Luke doesnt say what revision of 4.6 he was using... maybe its an early verison, and maybe there were some problems with timeouts...

Rob.

#7 Shaun Rudland

Shaun Rudland

    Expert

  • Members
  • PipPipPipPip
  • 165 posts
  • Location:Queensland, Australia

Posted 01 December 2002 - 11:07 PM

Timeout is actively used in the system I am currently involved in. It is used to prevent a user from 'locking' sensitive areas for extended idle periods, and also to auto-refresh a 'process progress' screen. Works fine.
PRO-IV free for 385 Days B)

#8 Luke Neethling

Luke Neethling

    Member

  • Members
  • PipPip
  • 17 posts
  • Gender:Male
  • Location:Roodepoort, South Africa

Posted 02 December 2002 - 07:18 AM

HI guys,

I am using pro-iv ver 4.6 rev 213. The Operating system platform is Linux 6.2. I have tried this on version 2.2 rev 513 and it works perfectly. The function times out and exist without any user intervention. There obviously seems to be a bug in the version I am using.

#9 Dennis John Laceda

Dennis John Laceda

    Member

  • Members
  • PipPip
  • 36 posts
  • Gender:Male
  • Location:Metro Manila, Philippines

Posted 02 December 2002 - 08:04 AM

better late then never.

i have used this before with one of the customers i used to support. they are using NT as OS.

it was working great until they tried to upgrade their SL version. it just did not work with the version we've upgraded into. but i can't just recall which versions.

so i guess i just want to say that some versions it works for some it don't.

regards,
Dennis

#10 Joseph Serra

Joseph Serra

    Advanced

  • Members
  • PipPipPip
  • 93 posts
  • Gender:Male
  • Location:Melbourne, Australia

Posted 02 December 2002 - 09:28 AM

In Luke's post, he said that he set @TFUNCT to 'MAIN', therefore I wonder if he is getting the standard ProIV message 'Enter Return To Continue' Message.

If this is the case, you can try disabling &#@RTCONT to stop this annoying feature.

As for the timeout function, it does work well here but as Rob said, we are very careful only to use it in menus and specific function which have no open files.

#11 Luke Neethling

Luke Neethling

    Member

  • Members
  • PipPip
  • 17 posts
  • Gender:Male
  • Location:Roodepoort, South Africa

Posted 02 December 2002 - 10:18 AM

HI Brian,

'Brain's reply'

I thought you'd be flattered.

#12 Vol Yip

Vol Yip

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 393 posts
  • Gender:Male
  • Location:Hong Kong

Posted 02 December 2002 - 03:49 PM

Hi all,

I am a bit worry to use this time out functionality. I thought the time out counts when there is no 'key board' intervention, am I correct?

It this is the case, how if the user is actually executing a big update (for example MPS / MRP) and this updates run for 1 hour. If time out set for 5 minutes, will system exectues the time out function (OFF, for example) after 5 minute of the MPS/MRP run?

Regards,

Vol

#13 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 02 December 2002 - 04:49 PM

No. Timeout only applies when ProIV is waiting for user input.
Nothing's as simple as you think

#14 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 02 December 2002 - 04:54 PM

Luke,

Given recent postings regarding CTRL+BREAK (rather than my experience), it occurs to me to ask whether you are using Oracle.

If there are problems with signal-handling when using some versions of Oracle, that might well affect the correct processing of timeouts.

It's just a speculation - perhaps Mr Gadsby will see this and know the answer :(


Richard
Nothing's as simple as you think

#15 Dennis John Laceda

Dennis John Laceda

    Member

  • Members
  • PipPip
  • 36 posts
  • Gender:Male
  • Location:Metro Manila, Philippines

Posted 03 December 2002 - 02:26 AM

vol.... besides PROIV timing out when waiting for user entry. normally there should be a operator id used to run the MRP/MPS functionality of glovia. then this operator should be setup accordingly to avoid complications. usually it's better to setup operators in Glovia based on purpose/job to do.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users