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
Solved

Display background running process on shell prompt

Posted on 2009-04-10
5
522 Views
Last Modified: 2013-12-06
Hello,

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?

Thanks
0
Comment
Question by:ISGAmin
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:omarfarid
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
0
 

Author Comment

by:ISGAmin
ID: 24116356
omarfarid:

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?

Thanks
0
 
LVL 40

Expert Comment

by:omarfarid
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?
0
 

Author Comment

by:ISGAmin
ID: 24116520
omarfarid:

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...

Thanks

0
 
LVL 40

Accepted Solution

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

789 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