[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: getting back to the prompt with &



   Xavier Bergade <xavier@rocketfuel.com> writes:
   XB> you type ls& at the prompt.
   XB> why the task is not complete until you press return?
   XB> Is it possible to get the task done without any key press ?

Is this transcript what you see?

    blp:/raid/home/blp$ ls&
    [1] 15060
    blp:/raid/home/blp$ #.newsrc-dribble#	dpkg-1.4.0.20
    Mail			fiasco			fiasco-70
    News			fiasco-0.1.2		fiasco-web
    PSPP-0.1.8		fiasco-0.1.3		fiasco-web-1
    PSPP-0.1.9		fiasco-0.1.4		fiasco-web-3
    TODO			fiasco-0.1.5		fiasco-web-4
    cpp_2.8.0-0.1_i386.deb	fiasco-0.1.6		floppy
    diffcvt			fiasco-36		gcc_2.8.0-0.1_i386.deb

    [1]+  Done                    ls
    blp:/raid/home/blp$ 

There are several things going on here:

1. You type `ls&' and press return.
2. bash starts up the ls program and prints the job number ([1]) and
its process id number (15060).  It then displays the prompt.
3. While this is going on, ls is reading the directory and sorting
it.  It displays the directory list.
4. At the same time, bash is waiting for you to type a command.  It
has already displayed the prompt.  You can type a command now.
However, you press enter instead.
5. bash detects that the ls process is dead.  It displays a message to
that effect.
6. bash displays another prompt.

Does that help?


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: