Hi All,
Suppose I have a script and inside it I want/need to put it into background. I need the script to not react to SIGHUP signals.
I tried:
When I run this script I have the output:
Now from the console I can do "bg %4" and the script runs in background.
I want to run bg from the script, but I don't know the job-spec number of my stopped script.
The line "jobs > myjobs" created empty file myjobs.
How to overcome this?
i am trying to find a way to put an interactive script in the background after taking input from the user
a few test lines i was trying:
date
echo "Enter location"
LOCATION=
read LOCATION
sleep 100
sleep 200
date
for this small example i want the script to as the user for the... (7 Replies)
Hi
I have a script, which i ran in background, can someone please help in stopping this.
i gave this command:
ksh abc.ksh &
this script sends me a mail every 30 seconds. i have deleted the script but still i am getting the mails. can some one please help me stopping dese.
... (3 Replies)
Gurus,
Pls. help on this to run the script in background.
I have a script to run the informatica workflows using PMCMD in script.
Say the script name is test.sh & Parameters to the script is Y Y Y Y
The no of parameters to the bove script is 4. all are going to be a flags. Each flag will... (2 Replies)
When I run the following snippet in background
#!/bin/ksh
while
do
echo "$i"
sleep 10
i=`expr $i + 1`
done
My job got stopped and it says like + Stopped (SIGTTOU) ex1 &
I did "stty tostop" as suggested in many of the post but still not working... (3 Replies)
I have a command running in the foreground (and so my term window is locked up) and I want to kill it, then resume it in the background and go home. It is creating a zip file, and the file will be written to the current directory - no std in / std out issues.
How do I do this? Kill it with a... (3 Replies)
I have a script called startWebLogic.sh which I was running in the background but the problem is which I used the command :- ps -elf | grep "startWebLogic.sh" | grep -v grep to find the process id but I was unable to find the process id for this script and when I checked from the front end the... (3 Replies)
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)
HI
I have by mistaken delete my script but its still running in background and giving me output and cretaed ..nfsB5DC2 file.
I have kill all my prosses still it running....
How can i stop this script.
i have unix solaris systems. (8 Replies)
Hi,
I wrote a KSH script and running it on HP-UX machine
I am running one script in background.
My script is at location
$HOME/myScript/test/background_sh
When I view my script in background with psu commend
> psu | grep background_sh
I see following output
UID PID PPID C ... (1 Reply)
Discussion started by: vaibhav
1 Replies
LEARN ABOUT OPENSOLARIS
disown
disown(1) User Commands disown(1)NAME
disown - ksh93 built-in function to disassociate a job with the current shell
SYNOPSIS
disown [job ...]
DESCRIPTION
The ksh93 disown command prevents the current shell from sending a HUP signal to each of the specified jobs when the current shell termi-
nates a login session.
If job is omitted, disown sends the HUP signal to the most recently started or stopped background job.
OPERANDS
The following operands are supported:
job Specifies the job or jobs on which disown operates.
Specify job as one of the following:
number Refers to a process ID.
-number Refers to a process group ID.
%number Refers to a job number.
%string Refers to a job whose name begins with string.
%?string Refers to a job whose name contains string.
%+ or %% Refers to the current job.
%- Refers to the previous job.
EXIT STATUS
0 Successful completion.
>0 One or more specified jobs does not exist.
EXAMPLES
Example 1 Disowning a Job
The following example disowns job 1:
example% disown %1
AUTHORS
David Korn, dgk@research.att.com
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Uncommitted |
+-----------------------------+-----------------------------+
SEE ALSO bg(1), jobs(1), ksh93(1), wait(1), attributes(5)SunOS 5.11 18 Apr 2007 disown(1)