A declaração mencionada está incorreta porque os descritores de arquivo padrão devem estar abertos.
Especificação POSIX: C.2.7 Redirecionamento
Applications should not use the
[n]<&-
or[n]>&-
operators to execute a utility or application with file descriptor0
not open for reading or with file descriptor1
or2
not open for writing, as this might cause the executed program (or shell built-in) to misbehave. In order not to pass on these file descriptors to an executed utility or application, applications should not just close them but should reopen them on, for example,/dev/null
. Some implementations may reopen them automatically, but applications should not rely on this being done.
A instrução preferiria ser
gzip somefile.txt >/dev/null 2>&1 &