-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ron Stodden wrote on Tue, Feb 04, 2003 at 09:12:59PM +1100 :
> Todd Lyons wrote:
> 
> >Not quite.  See the prompt above?  It had already exited.  The messages
> >you see afterward are from kdeinit killing itself and its child
> >processes off.  Do it again and instead of hitting Ctrl-C at this point,
> >press Enter and you'll get a prompt as well
> >
> But why?  Surely a completing program should make the OS give a prompt?   
> 9.0 doesn't!

It already did.  :)  All the lines that start with kdeinit are stderr
output from a program that's shutting down.  You already have a prompt
at this point.  You could just start typing your command.  Even though
the cursor is not at the [user@machinename dir] prompt, the shell still
thinks it's there because it ignores stderr from running programs.

The best way I know to show you this is this small program:
#!/bin/bash
. /etc/rc.d/init.d/functions
echo -n "Starting sleeper function"
echo_success
echo
(sleep 5 && echo -n "Completing sleeper function" && echo_success) &

It starts a process running in the background that sleeps for 5 seconds
and then prints some stuff.  Notice where it prints the "completing"
message.  Notice where it puts the cursor after the second OK.  Just
type "ls" and it will list the current directory.  The shell still
_thinks_ that the cursor is at the same spot.

Changet he last line to:
(sleep 5 && echo -n "Completing sleeper function") &

Same thing.

Blue skies...                   todd
- -- 
...and I will strike down upon thee with great vengeance and furious
 anger, those who attempt to poison and destroy my binaries, and you 
    will know my name is root, when I lay my vengeance upon thee.
      Mandrake Cooker Devel Version, Kernel 2.4.21pre4-1mdk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+QAY3lp7v05cW2woRAlfxAJ9vaVT8HwuM47X7AOnzykkIgp11GwCePkFy
HBxR/ApMfqqWiOlqEGaU8+s=
=Qy38
-----END PGP SIGNATURE-----

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to