stopped(sigttou) error while executing a script in background


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users stopped(sigttou) error while executing a script in background
# 1  
Old 03-07-2012
stopped(sigttou) error while executing a script in background

Hi All,

I have an issue where in when i execute a script in the background using '&', it exits with stopped(SIGTTOU) signal.
There are two servers, where the Compute server is HP-Unix and Data server is Linux.
I tried using the "stty - tostop" command to disable the SIGTTOU for background jobs trying to write to the terminal, but that did not solve the issue.
I also tried trapping SIGTTOU using

Code:
 
trap '' 28

28 is for SIGTTOU in "kill -l"

This too did not resolve the issue.
Could anyone help me out in this? Is there anything else I can try?
Does the Data server being Linux have anything to do with it? (I was trying all the above commands in the Compute server from where the scripts are executed.)

TIA,
Vijay
# 2  
Old 03-10-2012
Here are two ways, there are others.
Try something like this if you don't want errors logged:
Code:
[command options arguments go here]  2>/dev/null > output.lis &

run with errors logged:
Code:
[command options arguments go here]  2>errors.lis > output.lis &

Also consider the nohup command to prevent the job from being killed by the SIGINT signal (ctrl/c)
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Korn Shell script in stopped state while running in background

Hi, I want to run a shell script in background . but its going to stopped state $ ksh cat_Duplicate_Records_Removal.ksh & 8975 $ + Stopped (tty output) ksh cat_Duplicate_Records_Removal.ksh & why is this happening? Also could anyone please tell me what is a stopped... (12 Replies)
Discussion started by: TomG
12 Replies

2. Shell Programming and Scripting

Executing a background script using ssh keys

Greetings, i've been working with a user-friendly menu on ksh to allow users execute scripts located on a remote server, so they wont have to login and manually launch those scripts every single time. This is a HP-UX box and currently on a /usr/bin/ksh shell. I've setup ssh keys on both... (1 Reply)
Discussion started by: nbriozzo
1 Replies

3. Shell Programming and Scripting

Error when running script in background

Hi guys, ./test.sh & #!/usr/bin/ksh echo "No.Of Items :" read count echo "Report Time (Min):" read time some other command .... exit 0; thanks (3 Replies)
Discussion started by: asavaliya
3 Replies

4. Shell Programming and Scripting

A puzzle with a printing function executing in background

Somebody on a thread in the (french) Mandriva Forum recently suggested a script, designed to provide a tool to display kind of "temporisation widgets" on the console (to be ultimately pasted in other more complex scripts). One version of this script was something like the following, which seems... (6 Replies)
Discussion started by: klease
6 Replies

5. AIX

Command executing to be in the background !

Guys I'm working to make in AIX script and I have some commands need to be excited by that script Like the below commands ... startsrc -s sshd I want that executing to be in the background of the system I do not like to see the out put of that (3 Replies)
Discussion started by: Mr.AIX
3 Replies

6. UNIX for Dummies Questions & Answers

Executing a sequence of commands as a single background process

I'm writing a PHP script which will take a given media file and convert it into a flash (flv) file. In addition to this, once the flv file has been generated I create two thumbnails (of different sizes) from the newly generated flv file. In order to do this I'm calling ffmpeg from the command... (4 Replies)
Discussion started by: phatphug
4 Replies

7. Shell Programming and Scripting

Why the nohup-ed background process always is "stopped" ?

I let a script A call script B. I used nohup a.sh &>/tmp/log & In script A it calls B directly, without any redirecting or nohup or background. However A is always "Stopped", while B is running correctly. Anybody knows why? thanks! -----Post Update----- BTW, if I don't use nohup... (4 Replies)
Discussion started by: meili100
4 Replies

8. UNIX for Advanced & Expert Users

Why the nohup-ed background process always is "stopped" ?

I let a script A call script B. I used nohup a.sh &>/tmp/log & In script A it calls B directly, without any redirecting or nohup or background. However A is always "Stopped", while B is running correctly. Anybody knows why? thanks! -----Post Update----- BTW, if I don't use nohup... (1 Reply)
Discussion started by: meili100
1 Replies

9. UNIX for Advanced & Expert Users

SIGTTOU Error in FTP process

Hi, I am getting the + Stopped (SIGTTOU) error while trying to FTP some files.Here is what am doing: I have database sitting on the UNIX box.I have a table where i stored the ipaddress,username and password.Now i have a script,when run,goes to the database,takes the ipaddress,username and... (1 Reply)
Discussion started by: Kumar71
1 Replies
Login or Register to Ask a Question