1.\" $OpenBSD: nohup.1,v 1.16 2010/09/29 07:44:56 jmc Exp $ 2.\" $NetBSD: nohup.1,v 1.5 1995/08/31 23:35:24 jtc Exp $ 3.\" 4.\" Copyright (c) 1989, 1990, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" This code is derived from software contributed to Berkeley by 8.\" the Institute of Electrical and Electronics Engineers, Inc. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 3. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)nohup.1 8.1 (Berkeley) 6/6/93 35.\" 36.Dd $Mdocdate: September 29 2010 $ 37.Dt NOHUP 1 38.Os 39.Sh NAME 40.Nm nohup 41.Nd invoke a command immune to hangups 42.Sh SYNOPSIS 43.Nm nohup 44.Ar utility 45.Op Ar arg ... 46.Sh DESCRIPTION 47The 48.Nm 49command allows the specified utility to be protected from termination 50if the user should become logged out 51(for example, due to a modem line or TCP/IP connection being dropped). 52To do this, 53.Nm 54sets the 55.Dv SIGHUP 56.Xr signal 3 57.Pq Dq terminal line hangup 58to be ignored, 59then executes 60.Ar utility 61along with any arguments. 62.Pp 63If the standard output is a terminal, the standard output is 64appended to the file 65.Pa nohup.out 66in the current directory. 67If standard error is a terminal, it is directed to the same place 68as the standard output. 69.Pp 70If the output file 71.Pa nohup.out 72cannot be created in the current directory, 73.Nm 74attempts to create the file in the user's home directory. 75If the file 76.Pa nohup.out 77cannot be created, 78either in the current directory or the user's home directory, 79.Nm 80will exit without invoking 81.Ar utility , 82with an exit value as described below. 83.Sh ENVIRONMENT 84.Bl -tag -width Ds 85.It Ev HOME 86User's home directory. 87.El 88.Sh EXIT STATUS 89The 90.Nm 91utility exits with one of the following values: 92.Pp 93.Bl -tag -width Ds -offset indent -compact 94.It 126 95The 96.Ar utility 97was found but could not be invoked. 98.It 127 99The 100.Ar utility 101could not be found or an error occurred in 102.Nm . 103.El 104.Pp 105Otherwise, the exit status of 106.Nm 107shall be that of 108.Ar utility . 109.Sh SEE ALSO 110.Xr csh 1 , 111.Xr signal 3 112.Sh STANDARDS 113The 114.Nm 115utility is compliant with the 116.St -p1003.1-2008 117specification. 118.Pp 119.Nm 120also exists as a built-in to 121.Xr csh 1 , 122though with a different syntax. 123