News for hackers. Stuff that matters.
Re:Rumors of Cmd’s death have been greatly exaggerated by nimish on Thursday January 05, 2017 @03:03AM (#13325542)
Also, on Unix everything is a fd until it isn't, like timers, signals, semaphores , pids...(and sockets have their own peculiar API). Pids not being fds leads to a really annoying issue of basically not being able to easily implement a robust way of handling child exits

NT is more Unix than Unix in a lot of ways, where everything is an object (more or less)

Plan 9 though really ran with the whole file thing

Re:Rumors of Cmd’s death have been greatly exaggerated by quotemstr on Thursday January 05, 2017 @11:48AM (#13328669)
> NT is more Unix than Unix in a lot of ways, where everything is an object

Yep. NT's design in this respect is great. Each NT object also has a name in a global system namespace; each object has its own access control list; and most objects are dispatcher objects that you can use with functions like WaitForMultipleObjects. In Windows, it's trivial to wait for, say, a socket* and a process at the same time.

I've always wanted to add NT-style process handles to Linux. A few other people have tried, but Linus has rejected their patches on the grounds that if you can open a handle to a process (preserving its PID), a program can fill up the process table.

I've never bought this argument. You can fill up the process table in other ways today without a ulimit, and we can make the process ulimit apply to process handles too.

...

* Screw you, in-process winsock providers. My programs treat sockets as regular HANDLEs, and if you install some shim that breaks this model, shame on you.

Re:Rumors of Cmd’s death have been greatly exaggerated by justincormack on Thursday January 05, 2017 @01:13PM (#13329680)
One day the capsicum port to Linux might happen, but in the meantime FreeBSD does have it, so has file descriptors for processes.
Re:Rumors of Cmd’s death have been greatly exaggerated by nimish on Thursday January 05, 2017 @03:27PM (#13331038)
And signals, timers and events (inc semaphores) have non-standard fd versions too, but they've been bolted on and you need all kinds of new syscalls to make them work right.

Plan 9 did it right if you want to go "everything is a file"