Sponsored Content
Top Forums Shell Programming and Scripting session timeout for shell script Post 302356726 by krishmaths on Sunday 27th of September 2009 06:34:43 AM
Old 09-27-2009
Sorry to hijack the thread, but my question is very much related.

When I tried

Code:
nohup script.ksh &

A process id is displayed at the terminal, followed by another message,

Code:
Stopped.. Not a Terminal

What does it mean by "Not a Terminal"? The default log file nohup.out also contained the text "Not a Terminal"

How do I make the script run in nohup mode now?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

telnet session timeout

hi, we can set something such that if the user has been idle for a while, it will auto disconnect. where to do so? thanks (6 Replies)
Discussion started by: yls177
6 Replies

2. Shell Programming and Scripting

Can a timeout be specified in a shell script?

Hi, I have to develop a shell script which exits after <n> minutes. For e.g. The user is taking too much time to enter an input, and the script will terminate after 10 minutes pass by. Is this possible ? Thanks, Puneet (3 Replies)
Discussion started by: puneetarora_12
3 Replies

3. Solaris

Solaris 8 - Session timeout

Hi, anyone Audit requirement to set the Solaris 8 server session timeout to 180 sec , Please advice how can I do it .... Thanks (3 Replies)
Discussion started by: civic2005
3 Replies

4. UNIX for Dummies Questions & Answers

Find out excat timing of ftp control session timeout

We are facing difficulties in ftp'ing large files.For large file transfer using FTP, the control session gets timed out where as the the data session is active and transfers the file completely. Is there a way to make the control session active as long as data session? How to find the control... (1 Reply)
Discussion started by: rocker
1 Replies

5. AIX

Unix session timeout?

We recently moved servers to a new data center, and now we're experiencing user sessions timing out after non-activity. We didnt experience this before, or know of any timeout settings that may have been changed. Any things I can check out on the server? (3 Replies)
Discussion started by: NycUnxer
3 Replies

6. UNIX for Dummies Questions & Answers

Putty Session Timeout

Hi, I had add the following line into .profile and .bash_profile for the timeout session to avoid putty close automatically : timeout=10800 However, i still keep encounter session time out every after 60 seconds. Can anyone please help advice. Many Thanks! (2 Replies)
Discussion started by: wancy
2 Replies

7. Solaris

Session timeout setting in server

Hi All I need to set timeout of login session of a user if a user is idle for some time. I know the TMOUT setting but it work with only BASH & KORN shell only as I need to set for Bourne shell also. I am trying to put "ClientAliveInterval 300" in sshd_config & restart or refreshing the... (1 Reply)
Discussion started by: sb200
1 Replies

8. AIX

Set timeout value for ssh session to HMC?

Friends, Could anyone let me know - how to set the timeout value for ssh session to HMC? My HMC version is -- V7R7.4.0. I'm sure the version doesn't have anything to do with it. Thanks, -- Souvik (2 Replies)
Discussion started by: thisissouvik
2 Replies

9. Linux

Is it possible to set timeout on Linux screen session

Hello friends, I work on Linux servers via SSH (putty) and run "screen" to preserve my sessions so I can attach/detach them at anytime I wish without losing the connectivity/process disruption which is working perfectly fine. As my team members also have root access to those servers, it is... (7 Replies)
Discussion started by: prvnrk
7 Replies
nohup(1)						      General Commands Manual							  nohup(1)

NAME
nohup - Runs a utility ignoring hangups and quits SYNOPSIS
nohup utility [argument...] Note The C shell has a built-in version of the nohup command. If you are using the C shell, and want to guarantee that you are using the com- mand described here, you must specify the full path /usr/bin/nohup. See the csh(1) reference page for a description of the built-in com- mand. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: nohup: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
None OPERANDS
The name of a command to be invoked. Optional arguments required by the utility specified for invokation. DESCRIPTION
The nohup command runs utility, ignoring all hangups and QUIT signals. You can use this command to run programs in the background after logging off the system. To run a nohup command in the background, add an & (ampersand) to the end of the command. If nohup output is redirected to a terminal or is not redirected at all, the output is appended to the file nohup.out. If the file is cre- ated, the permission bits are set to Owner Read and Owner Write(600). If nohup.out is not writable in the current directory, the output is redirected to $HOME/nohup.out. If neither file can be created nor opened for appending, utility is not invoked. If standard error is a terminal, all output written to standard error is appended to the file receiving standard output. The nohup command accepts just one utility as an argument. To apply nohup to a pipeline or list of commands, enter the pipeline or list in a shell script file. Then run sh as utility using the following format: nohup sh -c file [Tru64 UNIX] You can also assign the shell file execute permission and run it as the utility in the form: nohup file NOTES
The term utility, rather than the term command, describes the argument to nohup because shell compound commands, pipelines, special built- in programs, and the like, cannot be handled directly. In addition, the term utility includes user application programs and shell scripts, not just the standard utilities. EXIT STATUS
The nohup command returns the following exit values: The specified utility was found, but could not be invoked. The error occurred in the nohup utility or the specified utility could not be found. The exit status is otherwise that of the utility. EXAMPLES
To leave a command running after logging out (sh only), enter: nohup find / -print & Shortly after you enter this, the following is displayed: 670 $ Sending output to nohup.out The process ID number changes to the background process started by the & (ampersand), in this case, 670. The $ (dollar sign) is the shell prompt. The message following informs you that the output from the find command is in the file nohup.out. Sending output... You can log out after you see these messages, even if the find command has not finished yet. If you are using csh, the built-in command nohup is executed instead of the system command. To execute the nohup system command, you must enter an absolute path. To do the same, but redirect the standard output to a different file, enter: nohup find / -print >filenames & This runs the find command and stores its output in a file named filenames. Now only the process ID and prompt are displayed. Wait for a second or two before logging out, because the nohup command takes a moment to start the command you specified. If you log out too quickly, utility may not run at all. Once utility has started, logging out does not affect it. To run more than one com- mand, use a shell script. For example, if you include the following shell script: comm -23 fi4 fi5 | comm -23 - fi6 | join -a1 - fi7 > comm.out and name it ncomm, you can run nohup for all of the commands in ncomm by entering: nohup sh ncomm If you assign ncomm Execute permission, you can obtain the same results by issuing the command: nohup ncomm To run this command in the background, enter: nohup ncomm & ENVIRONMENT VARIABLES
The following environment variables affect the execution of nohup: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. Determines the search path that will be used to locate the command to be invoked. FILES
Standard output and standard error file for nohup. SEE ALSO
Commands: csh(1), ksh(1), nice(1), Bourne shell sh(1b), POSIX shell sh(1p) Functions: sigaction(2) Standards: standards(5) nohup(1)
All times are GMT -4. The time now is 09:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy