[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [MiNT] /proc



> > It isn't solved under MagiC. And as SLBs do not show up in
> > u:\proc, there is
> > nothing you could apply the ioctl() to...
>
> Ahh... Well, I guess it's possible to expand Slbopen, perhaps by using
> negative values in min_er. E.g...
>
> SLB_FIRST -1
> SLB_NEXT  -2
>
> ...in min_ver will return the pid of the process(es) in a longword pointed
> to by *slb:
>
> long client_pid, next;
>
> next = Slbopen("foobar.slb", NULL, SLB_FIRST, &client_pid, slb_exec);
> while (next)
> {
>    next = Slbopen("foobar.slb", NULL, SLB_NEXT, &client_pid, slb_exec);
> }
>
> Ugly, but I guess it will work. You could also introduce two new opcodes,
> e.g...
>
> long Slb_client_first(char *name, char *path, long *pid)
> long Slb_client_next(long *pid)

I don't really like

a) first/next interfaces (see the FGETOPENS for a different approach) and

b) inventing new opcodes.

I would rather propose to define D/Fcntl opcodes. They could be implemented
on

a) the process file (which would only work under MiNT or

b) the SLB file (not very elegant though).

Regards, jre