my shell is /sbin/sh. i added stty susp '^Z' with the intention of being able to switch between foreground and background. but the result was strange.
i had 2 servers. one is sun the os is 8 and the other is hpux v11. both of them had the same shell. but on hpux, it works perfectly fine while... (9 Replies)
I am using a telnet session (VT100) and need to modify my .profile so that it will set the color of the telnet session. I am not using Xterm (ie: can't use .Xdefaults). I am able to change the colors via menu's but need to preset in .profile. Is this possible??? Can't find anything at all on how... (3 Replies)
hi, i am just wondering that wen we give the following code we make a process run in background...can the viceversa be performed?i.e can this be made foreground again
# sleep 75&
21751
# (4 Replies)
I'm not sure if it is even possible but I figured if it was someone here would know how to do it...
I am running a script which starts a bunch of processes in the background but there is one process I would like to bring back to the foreground when complete. Unfortunately the process that I... (2 Replies)
What are all the difference between a Background and Foreground processes ?!
A Background process does not have access to STDIN and OUT.. What else ?
Is there any detailed description available somewhere ? (5 Replies)
Hi, guys:
I am working on my own shell using c. When I put a process into the background, how can I put it back to the foreground using tcsetpgrp?
Thanks (3 Replies)
Hi,
Need an urgent help. I have a program executing in foreground. I need to execute it in background and also to remove terminal dependency.
Thanks In advance.
116@434 (7 Replies)
Hello,
I unfortunately have a process that does two things, it returns an answer to me and then does a bunch of work that I would like to wait on. Here is a simple example:
#!/bin/bash
function p_w {
echo "poopy"
sleep 10
echo "scoop"
}
foo=$(p_w &)
sleep 1
echo "1... (7 Replies)
Hi,
I am having issues with syntax when I am trying to send a job to the background after a input redirection.
I have this script which sends some files to different servers after zipping them. Once I execute it, it will ask for user input as of which server the files need to go to. (The... (3 Replies)
I have a question.
I will be running a background process using nohup and & command at end. I want to send output to a file say myprocess.out.
So will this command work?
nohup myprocess.ksh > myprocess.out &
Thanks in advance guys !!!
:) (3 Replies)
Discussion started by: vx04
3 Replies
LEARN ABOUT HPUX
tcgetpgrp
tcgetpgrp(3C)tcgetpgrp(3C)NAME
tcgetpgrp() - get foreground process group id
SYNOPSIS DESCRIPTION
returns the value of the process group ID of the foreground process group associated with the terminal referenced by fildes. is allowed
from a process that is a member of a background process group (see termio(7)); however, the information can be subsequently changed by a
process that is a member of a foreground process group.
RETURN VALUE
Upon successful completion, returns the value of the process group ID of the foreground process group associated with the terminal refer-
enced by fildes. Otherwise, returns a value of -1 and sets to indicate the error.
ERRORS
fails if any of the following conditions are encountered:
The file associated with
fildes is the controlling terminal of the calling process, however, there is no foreground process group defined for
the controlling terminal.
fildes is not a valid file descriptor.
The file associated with
fildes is not the controlling terminal or the calling process does not have a controlling terminal.
WARNINGS
The error which is returned if the controlling terminal has no foreground process group, might not be returned in future releases, depend-
ing on the course taken by the POSIX standard. Portable applications therefore should not rely on this error condition.
SEE ALSO setpgid(2), setsid(2), tcsetpgrp(3C), thread_safety(5), termio(7).
STANDARDS CONFORMANCE tcgetpgrp(3C)