Subject: Re: procfs/kernfs "required"? [was Re: kernfs & libkvm]
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Date: 01/13/1996 15:54:47
>>> It would be A Cool Thing [TM] if one could say
>>> 'echo KILL > /proc/<pid>/ctl' and the process would die... (subject
>>> to normal access controls, of course).
I believe it already works this way, though you may have to say kill
rather than KILL.
>> If you want to take this further, why not "rmdir /proc/<pid>" as kill -9?
>> It's easy to get carried away with this though, [...]
> Hey Cool! Then we can replace most system calls with file
> operations. We can deprecate everything to unlink(), mkdir(),
> read(), open(), creat(), write(), lseek() and close().
Yup. In many ways I'd like to see that happen. (Though I'd dump
creat(), since it's subsumed by modern open().)
Hm, have to add rmdir(). Or were you going to have unlink, applied to
a directory, turn into rmdir?
> Oh, and lots of new ioctl() to handle the "other stuff".
No, as someone else already said, just open the ctl file and read/write
it. The only excuse for ioctl is code that needs to do things when
handed just a file descriptor, like stdio doing a TCGETA on stdout.
I'm not sure how to address that.