Solved

Display background running process on shell prompt

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CPU monthly average? 12 120
Compare if date string is within text file 3 61
ftpcommand 2 64
text in table need to be center of the box 4 79
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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…

777 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