4 ms·
Not quite. Left to right: copy the descriptor 1 onto descriptor 4, change descriptor 1 to result of open("/dev/null"). The >& is for copying the descriptor not
by kubanczyk 5y ago
Not quite. Left to right: copy the descriptor 1 onto descriptor 4, change descriptor 1 to result of open("/dev/null").
The >& is for copying the descriptor not for aliasing ("hardlinking") it.
The descriptor is the "fd" argument, e.g.:
write(int fd, const void *buf, size_t count)