Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: