Hacker News
Pipes, Forks, and Zombies
syncsynchalt
|next
[-]
This explanation isn't correct, since a running `less` would not close the pipe and is still a reader. Writes to the pipe would block until `less` fully consumed it, or until `less` was quit such as with the `q` command.
The text _is_ correct if you add a missing step to `q`uit out of the `less` program. I think this step must have been dropped along the way. Unfortunately the screen capture doesn't show this step either.
js2
|root
|parent
|next
[-]
The description of `seq` isn't even correct: "If a second argument is provided, the numbers will stop printing at the once the second number has been reached. Otherwise, the numbers will continue forever"
Nope, `seq`'s arguments are defined as `[first [incr]] last`. With a single argument, it counts up from 1 to `last`. Maybe some previous version of `seq` behaved differently, but not as far as I can recall.
But again, can't hold anything against the page given the disclaimer.
brabel
|root
|parent
|previous
[-]
syncsynchalt
|root
|parent
|next
[-]
The slide says something like "run the command `seq 2 10000000 | less` and check `ps`, notice that `seq` isn't running". But that isn't how the processes will behave, `seq` will continue running (albeit blocked) until `less` is dead or closes the pipe.