stty: : I/O Error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting stty: : I/O Error
# 1  
Old 06-17-2010
stty: : I/O Error

Hi all,

I am stuck on a shell script issue and need your inputs:
I have a parent script A.ksh which call in another script B.ksh. At the start of the B.ksh, we export the .profile of another user and then call Informatica jobs.

Issue
When I run my jobs from the command prompt, it works perfectly fine. However, when I run my job from nohup utility in the background i.e.

Nohup /{path}/A.ksh > /tmp/trades.log &

To verify the status of job, when I run the ps -ef |grep A.ksh command, I get the following message:
[1]+ Stopped Nohup /{path}/A.ksh > /tmp/trades.log &

However, when I run the ps -ef |grep A.ksh command, it shows the normal running status.

While debugging, the execution flow goes to the B.ksh but gets stuck at export .profile statement. When I kill the parent script A.ksh, then execution flow moves ahead of the export .profile and starts executing the informatica jobs. We can not modify B.ksh file, as its provided by the clients and used by other scripts.
When the trades.log file is checked, the following error is received at the export .profile command:
Stty: :I/O error
I also tried using the same user to log in whose .profile is exported in the B.ksh script.

Your ideas and suggestions are welcome.

Thanks!
-Rishi
# 2  
Old 06-17-2010
AFAIK there is no ksh command "export .profile". What is actually in the script? We would expect perhaps ". /home/username/.profile"?
The "stty" errors are because "stty" requires a real terminal and there is no real terminal in background. Though it can be avoided with an "if [ ! -t 1 ]" test for every "stty" statement it would be better to make a new profile-type script containing only those statements which are relevant to running your database process and executing that script as ". /path/scriptname" instead.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use stty?

Hi , I have shell scripting in linux box. This script is mentioned that should be run under the one particular user. If you run that mentioned user location then it is working fine.... Suppose if you are trying run from some other user like as mentioned below sudo su - gxadm -c script.sh ... (1 Reply)
Discussion started by: Mani_apr08
1 Replies

2. UNIX for Advanced & Expert Users

stty issues

Copy Paste Issue... Pasted some c**p of a excel...!! Sorry Guys. Please look Below for the issue. (4 Replies)
Discussion started by: grep_me
4 Replies

3. Shell Programming and Scripting

stty error when script is called out of a cronjob

Hello, I'm trying to implement a script to call a third-party tool every so often and write the results to a file. If I run it interactively it works fine, but when it comes to run it out of a cronjob, I keep getting this error: stty: tcgetattr: a specified file does not support the... (3 Replies)
Discussion started by: fabiogilr
3 Replies

4. OS X (Apple)

Using stty

Hello, I am trying to configure a serial port, for mac os x 10.6. I believe I can use the stty command to look at serial port configuration and or change the serial port settings. I read the man page, but I don't really know what I am doing. Any help? (0 Replies)
Discussion started by: jamesapp
0 Replies

5. UNIX for Dummies Questions & Answers

stty: : Not a typewriter with AUTOSYS error

(sys10:pt:/pf>) cat 122974qqq.s RUNAS Version 2007.10.07 Run on Dec 11 2008 10:09:36 AM UNIX Process: 26021 Login User : root PFW User : s08280 Not a terminal stty: : Not a typewriter stty: : Not a typewriter ksh: jil: not found ksh: sendevent: not found... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

6. UNIX for Advanced & Expert Users

stty: : Not a typewriter -- Help please

Hi All, I have been runing the same set of program using the same auto profile for an year. Now when i run the same set of process , i getting the below error Not a terminal stty: : Not a typewriter stty: : Not a typewriter ksh: jil: not found ksh: sendevent: not found logout... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

7. UNIX for Advanced & Expert Users

stty: error occurs when installing rpm

Hello All, when I install rpm rpm --install rpm packagename I got the following errors stty:standard input:invalid argument stty:standard input:invalid argument I dont know what i have to do exactly. I search on google for the same but not a particular standard solution is given... (17 Replies)
Discussion started by: amitpansuria
17 Replies

8. UNIX for Dummies Questions & Answers

expect and stty paths are different and resulting in error.

Hello, i am using expect to automate file transfers to and fro with a sftp server. below is the script i am creating and executing in the main program. but i am getting the following error: the main program that creates and runs this script looks for words like "not found" in... (6 Replies)
Discussion started by: The Nemi
6 Replies

9. UNIX for Dummies Questions & Answers

stty errors

Hi folks, I run a script in rsh on HP-UX v2 (B.11.23 U 9000/800) and each time I have "su - user" in my program I'm getting the following output on the screen: stty: : Unknown error process not attached to terminal Usage: who r run level b boot time t time changes... (2 Replies)
Discussion started by: nir_s
2 Replies

10. UNIX for Dummies Questions & Answers

stty

I am trying to set my backspace key as the erase key right now I have to type CONTROL-H to delete. Can you please tell me the command to set my backspace as the erase key...... (1 Reply)
Discussion started by: frank
1 Replies
Login or Register to Ask a Question