debugging flags for runmenu?
Nancy Palmquist
nlp at vss3.com
Fri Aug 20 12:05:31 PDT 2004
Jeremy Anderson wrote:
> I've got an occasional hang on runmenu when exiting out of running a
> usermenu, returning to the main menu.
> It doesn't show up often, but it only seems to show up on my new test
> (soon to be prod) system:
> SuSE 9.1, running fp 5.0.14
> I can't replicate it reliably, because it just doesn't show up often
> enough. Does anyone know if there is any way to get some debugging info
> out of runmenu? Alternately, has anyone seen this on their systems, or
> better yet, fixed it?
> The actual command, as seen in ps waux, is: /appl/fp/runmenu dpromenu
> When I kill it (standard kill, no fancy SIGs needed), a prompt is
> returned to me.
> I'd kind of like to eliminate this sort of behavior before I turn users
> loose on this system.
>
Jeremy,
You might want to look at any scripts that the menus run - you know the
F5 scripts that are put instead of the one liners on the menus. You may
be doing things that are leaving you in a difficult place.
This behavior is more likely on Windows but you might have something
similar on the Linux.
Now here are the general rules I follow when designing a script for a menu.
1) Use ENVIRONMENT variables for all pathing. This will save you a
bunch of time later. That requires that you put the PFPROG, PFDATA, and
PFDIR values in the environment, but it is easy to do that.
example: $PFPROG/fp/rreport filename
instead of: rreport filename
2) Try not to use the CD command for anything - use full pathnames
instead of moving to a folder and then doing relative pathnames. If you
keep moving around, you might forget where you left things and get stuff
broken. I find that on WINDOWS, it does not put you back after you do
this and the next thing or returning to the menus might make it hard for
the menu script to be found. (Reason for speed issue on Windows in the
place you indicate.)
Also the full paths make moving to another system with a different
structure a simple task.
For example if you want to write to the fpmerge folder, use
$PFDATA$PFDIR/fpmerge or %PFDATA%%PFDIR%\fpmerge
and if the fpmerge folder stays with the filepro folder it will always
be found with this path.
3) If you decide to break rule 2 and use the CD command, always return
the user to the original location at the end of the script with another
CD command.
4) If you move between UNIX and DOS, watch your case on the menus.
Follow the UNIX case rules or assume that case is significant and work
that way. It will also save your butt later on.
5) Use the correct syntax for calling a menu from a menu:
!menuname and not the old and slow thing p menuname
If you use the second form, it has to find the p program then load the
runmenu again, the first is much much faster and does not spawn another
session.
Well I have given you my tips for menus. Not sure if this will help,
but I know it saves me trouble and makes these things more consistant.
Hope it helps.
Nancy
--
Nancy Palmquist
Virtual Software Systems
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list