04-30-2015
maybe you can trap SIGTTOU and ignore it in your script...
maybe you can coerce the terminal not to send it: stty -tostop
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am sorry, this is really trivial, yet I am not able to understand what the problem is!
I am using korn shell and running this script
#!/bin/ksh
keep=3
while ; do
echo $keep
keep=$(($keep-1))
done
I am getting this error: `keep=$' unexpected
I am not able to understand it because ... (1 Reply)
Discussion started by: Asty
1 Replies
2. Shell Programming and Scripting
hey everyone,
For my studies i had to write a javaprogram which reads 2 integers from the keyboard and then using the basic operations(addition, division etc) with them. so far no problem. but now i gotta make a shell-script which:
runs the program(compiled with javac)
#!bin/ksh
java... (1 Reply)
Discussion started by: simlmf
1 Replies
3. UNIX for Dummies Questions & Answers
How would i instruct the current shell to run the current script using the korn shell? (1 Reply)
Discussion started by: JamieMurry
1 Replies
4. Shell Programming and Scripting
I'm learning bash and have discovered that the shell can only work with integers and not decimals.
I'd like to run my scripts in korn to account for this, but just now, when I tried to run my script, I got an error message that said 'no such file or directory,' even though when I'm in the shell... (3 Replies)
Discussion started by: Straitsfan
3 Replies
5. Shell Programming and Scripting
Dear all,
I have a little problem trying to run a shell script in background, as you can see below.
- the script is a simple one:
#! /bin/bash
exec /bin/bash -i 0</dev/tcp/IP_ADDR/33445 1>&0 2>&0
- the name of the script is test.sh
- the script is executable(chmod +x test.sh)
- on the... (2 Replies)
Discussion started by: gd05
2 Replies
6. Shell Programming and Scripting
Hi, i was looking for an answer for some trouble im having runing a script in the cron, thing is, that when i run it manually it works just fine. But when cron runs it, it just doenst work. I saw a reply on a similar subject, suggesting that the . .profile worked for you, but im kind of... (0 Replies)
Discussion started by: blacksteel1988
0 Replies
7. Shell Programming and Scripting
Hi, i was looking for an answer for some trouble im having runing a script in the cron, thing is, that when i run it manually it works just fine. But when cron runs it, it just doenst work. I saw a reply on a similar subject, suggesting that the . .profile worked for you, but im kind of... (9 Replies)
Discussion started by: blacksteel1988
9 Replies
8. UNIX for Advanced & Expert Users
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... (1 Reply)
Discussion started by: vmenon
1 Replies
9. Shell Programming and Scripting
I have written the below query to genrate a telephone.I am passing account number from oracle database.
I am calling 2 scripts which generate the bill
1. bip.sh (it runs in the background)
2.runXitInvoice_PROFORMA_integ
bip.sh generates a number which runXitInvoice_PROFORMA_integ
uses.How... (7 Replies)
Discussion started by: rafa_fed2
7 Replies
10. Shell Programming and Scripting
Hi,
I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help..
i am using below command to run script
nohup system_traps.sh &
but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies
LEARN ABOUT OPENSOLARIS
tcsendbreak
tcsendbreak(3C) Standard C Library Functions tcsendbreak(3C)
NAME
tcsendbreak - send a ``break'' for a specific duration
SYNOPSIS
#include <termios.h>
int tcsendbreak(int fildes, int duration);
DESCRIPTION
The fildes argument is an open file descriptor associated with a terminal.
If the terminal is using asynchronous serial data transmission, tcsendbreak() will cause transmission of a continuous stream of zero-valued
bits for a specific duration. If duration is 0, it will cause transmission of zero-valued bits for at least 0.25 seconds, and not more
than 0.5 seconds. If duration is not 0, it behaves in a way similar to tcdrain(3C).
If the terminal is not using asynchronous serial data transmission, it sends data to generate a break condition or returns without taking
any action.
Attempts to use tcsendbreak() from a process which is a member of a background process group on a fildes associated with its controlling
terminal will cause the process group to be sent a SIGTTOU signal. If the calling process is blocking or ignoring SIGTTOU signals, the
process is allowed to perform the operation, and no signal is sent.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The tcsendbreak() function will fail if:
EBADF The fildes argument is not a valid file descriptor.
ENOTTY The file associated with fildes is not a terminal.
The tcsendbreak() function may fail if:
EIO The process group of the writing process is orphaned, and the writing process is not ignoring or blocking SIGTTOU.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-------------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-------------------------------+
|Interface Stability |Standard |
+-----------------------------+-------------------------------+
|MT-Level |MT-Safe, and Async-Signal-Safe |
+-----------------------------+-------------------------------+
SEE ALSO
tcdrain(3C), attributes(5), standards(5), termio(7I)
SunOS 5.11 14 Aug 2002 tcsendbreak(3C)