Wolfgang Lenerz writes:

>  > But as George reminds us (and I also remember this from old readings)
in
> > assembler it is very easy to change the owner of an already launched
> > job, from inside or outside of that job. It is the matter of changing
> > the value of 1 btye somewhere in memory, certainly in supervisor mode.

It may be possible to change the owner by poking a new owner's job ID (not a
byte but a long word) in the slave job's JCB.

> > Why not a new keyword to give that possibility also to SBASIC
> > programmers?
>
> Because I don't know what happens to a job if you change its owner. Nor do
> I know what happens to the old owner and/or the new owner. Probably
nothing,
> but it's a risk I wouldn't want to take (on a system wide level).

Thats right; it could cause a mess in certain circumstances. The best way to
do it cleanly is for the ownership to be specified during a job's creation
time.

> There is no OS facility to do that change safely.
> I'm pretty sure many people on this list can knock up a small Sbasic
> extension that chnages a job's owner and make it generally available.
>
> For something like this to be included in the OS itself, it should be done
> only after making sure that there will be no unforeseen consequences....
>
> Or am I being too cautious and conservative?

A healthy attitude to take in your "job" as Registrar, I think.

If the problem is relatively unique, the simplest solution might be to
produce (or ask someone else to do it for you, Arnould) a new, ad hoc,
keyword to EXECute jobs that allows you to specify the owner.

A more elaborate solution to solve the problem in a general way might be to
extend the functionality of the existing suit of keywords, ie EX, EW, ET,
etc. The parameter options for these keywords are already overly
complex so its not ideal, but I think it could be done relatively easily:
Wherever the ;<parameter string> option is allowed in the parameter list
there could equally well be \<owner job ID> and/or !<priority> instead or in
addition, in any order, ie:

    EX [ #channel TO ] prog_spec [ TO prog_spec ] * [ TO #channel ]

where prog_spec is

    program [, filename | #channel ] * [ [ ; parameter string] [ \ owner ]
[ ! priority ]  ]

Better than producing a new keyword (with or without degrading the existing
nomenclature eh, Wolfgang ;)

Per

_______________________________________________
QL-Users Mailing List

Reply via email to