[comp.os.os9] Writing Trap Handler in System State

jh@materna.uucp (Juergen Hackenbroich) (08/01/88)

Hello,

I need to write a trap handler which executes in system state
to allow some user to do things normally not permitted.

Testing with the example in the manual, I get it only running
in user state, but the manual doesn't tell anything about
differences between user and system state in trap handlers.

Does anybody out there have some hints for me ?

Thanks

Juergen

adp@moscom.UUCP (Alan Percy) (08/03/88)

In article <391@materna.uucp> jh@materna.UUCP (Juergen Hackenbroich) writes:
>
>Hello,
>
>I need to write a trap handler which executes in system state
>to allow some user to do things normally not permitted.
>
>... I get it only running
>in user state...

You have to have the following things set up:
	1. The owner/group id must be set to 0,0 (super user)
	2. The Supervisor state bit (Supstat) must be set in the
	   module Attribute/Revision word.
Both of these items are defined in the 'psect' of you main module.
They can also be changed with the FIXMOD utility.

Also, because your trap handler is running in supervisor state,
the scheduler will not preempt it. ie: make the trap handler short.

Hope this helps.
-- 
Alan Percy..........................{rutgers,ames,cmcl2}!rochester!moscom!adp