Display background running process on shell prompt

Posted on 2009-04-10
Last Modified: 2013-12-06

I was wondering if it is possible in HP-uX to take a process that is running in the background, such as being run by CRON, and bring it to your current shell prompt. In other words, say I have a process called "job1" schedule to run at 12PM, and at 1PM I want to see it on my terminal session, can I bring it to my session and interact with it?

Question by:ISGAmin
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 40

Expert Comment

ID: 24116338
if you are referring to job control available in csh, ksh, bash then the answer is no.

If your cron job can at 1 PM open the terminal you are at for input / output then yes

Author Comment

ID: 24116356

Thank you for the response,

When you say open the terminal, what exactly do you mean?

What I am trying to accomplish is this.. Say I schedule a program to run, but there is an error and we need to access it to fix it, how can I access the program to resolve the issue?

LVL 40

Expert Comment

ID: 24116489
Each user when he / she logs in the system assign a terminal device to him / her. You may find it by running the command tty

Now, if you are using telnet or ssh or X windows to login then the device name or the terminal name will be dynamic. But if you login from a console or a terminal that is directly connected then the device name will not change. In such a case, the application can use this device name to send output to it (including errors) and receive input from it. This requires a change in the program to do so.

How do you get the errors from this application?

Author Comment

ID: 24116520

So you are saying that cron can launch a job and direct the output to a specific terminal?

The application is a BASIC compiler that runs on HPUX ,, so the programs are interactive in the sense that they can be stopped and edited, etc, and continue.. if an error occurs on  a line in the program, it halts and sends an error email alert...


LVL 40

Accepted Solution

omarfarid earned 500 total points
ID: 25184429
yes cron can run a job and send its output to a specific terminal

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question