It is currently Tue, 17 May 2022 17:39:56 GMT



 
Author Message
 Background job interferes with user input, how do I avoid it?
Hello all,

I am reasonable new with UNIX and came across this problem while
programming this script, hope someone has good advise:

In my script I start as a backgound job a FTP session to an other node
to collect a logfile. Meanwhile I prompt for userinput (with a READ
statement) . Sometimes it happends that while the userinput is being
typed in, the background job finishes. This results in an echo of the
already typed in userinput on the screen. The result looks like this
(user typed in 1234).

Enter code to search for : 12341234

Although it doesn't give problems with the execution of the script, I
find it confusing and cosmetically not so nice.

Any suggestions how to avoid this ????

TIA Ruud Bijl (The Netherlands)



 Wed, 04 Jun 2003 20:55:16 GMT   
 Background job interferes with user input, how do I avoid it?
In article <mrom3tk8hui4i9d06svdkgidc5el35u...@4ax.com>,

Does redirecting the output of the background job to /dev/null help?

--
Barry Margolin, bar...@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



 Thu, 05 Jun 2003 14:36:12 GMT   
 Background job interferes with user input, how do I avoid it?
On Sun, 17 Dec 2000 06:36:12 GMT, Barry Margolin <bar...@genuity.net>
wrote:

Hello Barry,

I already do so, I use the following statement to start my background
job:

get_tmfile $logfile > /dev/null &

where get_tmfile is a scripte that handels the FTP session, and
$logfile is the file to collect.

Ruud



 Thu, 05 Jun 2003 14:47:59 GMT   
 Background job interferes with user input, how do I avoid it?
tried  'get_tmfile $logfile >& /dev/null &' ???

{SNIP}

--
You've one mouth and two ears...use them in that proportion.
Jahagirdar .V.S
IC Design Engineer , Texas Instruments (India) Ltd.
Ph (91)080-5099129(O) Ph (91)080-5262521(R)



 Sat, 07 Jun 2003 23:41:18 GMT   
 Background job interferes with user input, how do I avoid it?
Ruud,

Try redirecting stderr as well.  'get_tmfile $logfile > /dev/null 2>&1 &'

HTH,
Mark



 Mon, 09 Jun 2003 01:20:24 GMT   
 
   [ 5 post ] 

Similar Threads

1. How do a see what a user is doing (input/output to screen)

2. Background jobs for normal users

3. Compaq RAID5 Disk Accesses Interfere With Keyboard/Mouse Input at Console

4. How to avoid deadlock when doing read_lock(&tasklist_lock)

5. Question: Preventing user processes from interfering with another...

6. need to restrict users from doing a su to a selected group of users

7. need to restrict users doing a su to a selected group of users

8. need to restrict users doing a su to a selected group of users

9. input/output error when doing mkdir

10. SCSI problems - Input/output error when doing ls?


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software