[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nohup --no-output-file
From: |
James Youngman |
Subject: |
Re: nohup --no-output-file |
Date: |
Tue, 12 Apr 2005 09:24:25 +0100 |
User-agent: |
Mutt/1.3.28i |
On Tue, Apr 12, 2005 at 01:42:15AM +0800, Dan Jacobson wrote:
> Maybe add an option to make no nohup.out, so folks don't need to do
> nohup ...
> rm -f nohup.out
This is dangerous, as it allows the possibility that the filesystem
could fill up - the old nohup.out file is still open, even though
there are no longer any filenames that refer to it.
It's much better in this case to do
nohup ... > /dev/null 2>&1 </dev/null.
> And allow them to write to other places, not just nohup.out
Ordinary redirection will achieve that, as above. From the second
paragraph of the Info page on nohup:-
|| If standard output is a terminal, it is redirected so that it
|| is appended to the file `nohup.out'; if that cannot be written to,
|| it is appended to the file `$HOME/nohup.out'. If that cannot be
|| written to, the command is not run. If standard output is not a
|| terminal, then the standard output of COMMAND will be the same as
|| that of `nohup'.
Regards,
James.