Rely to a process running nohup in background

From: Edward Soldanels (ed.soldanels@KCMETRO.EDU)
Date: Thu May 22 2003 - 08:38:08 EDT


Can anyone tell me if there is a way to reply to a system prompt for a shell
script that is running under nohup and in the background where the stdout
and stderr are redirected to a log file. Once you log out and back in again
as the same user, the jobs that you started in the first session do not show
when you execute the 'jobs' command; so it appears that you cannot use the
'fg' command to bring a background job into the foreground to reply to the
system prompt.
What I am attempting to do is run some backups from a shell script that I
run with nohup in the background. What I want to be able to do is submit
the script, logout, then log back in again from a different time and/or
place to check the log file, and reply to any prompts for tape media that
have come up. The prompt is expecting me to hit the enter key to
acknowledge that the tape media has been mounted in the tape drive, but I do
not know how to accomplish this for a job running in background. Some of my
backups span multiple tape volumes, so the -q flag of the backup command is
not useful in this scenario. I typically will be doing this via a dial-up
connection where my session persistence is not guaranteed. Is there a
better way to handle this? Thanks.

Ed



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:51 EDT