Solved

Display background running process on shell prompt

Posted on 2009-04-10
5
518 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now