Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #12595

Re: background processes (was HOW2 capture time of power-failure?)

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.os.linux.misc, comp.sys.raspberry-pi
Subject Re: background processes (was HOW2 capture time of power-failure?)
Date 2014-11-03 12:56 +0000
Organization A noiseless patient Spider
Message-ID <m37u1s$vl2$1@dont-email.me> (permalink)
References <m2tdmr$hi8$1@dont-email.me> <m36sik$5a9$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


On Mon, 03 Nov 2014 03:25:08 +0000, not.socialnetwork wrote:

> After the multics OS failed, from excess complexity, Unix was a
> spoof-name, trying to emphasise simplicity.
> Later, the blokes who designed unix abandoned it, for a simpler design:
> plan9.
>
You've got that backward. Multics was quite successful in its day but, 
being quite a large system, was too expensive to have many installations. 
The project started in 1964, there were 80 Multics installations and the 
last one was decomissioned in 2000. I don't call that failure. The ideas 
behind it had a big influence on many of the later OSes. 

See: https://en.wikipedia.org/wiki/Multics  for details.

Plan 9 is arguably less successful than Unix: I've used several Unix 
flavours but never seen a Plan 9 system. In any case both have been more 
or less totally eclipsed by Linux.

==========
You may find the following script a little easier to follow when it runs 
that the original. I've added a parameter to switch between killing the 
background task: 

	tscript

and waiting for it to end: 

	tscript wait 

I've also changed the echoed output to make the source of the various 
messages a bit clearer:


========================start of tscript=========================
#!/bin/sh 
echo "Foreground: pid $$ starting"
(echo "   Background: started";sleep 5;echo "   Background: finished") &
bgpid=$!
echo "Foreground: background with pid $bgpid is running"
sleep 1 

# wait around for background process to finish before quitting
if [ "$1" == 'wait' ]
then
   echo "Foreground: waiting for background pid $bgpid to end"
   wait $bgpid
else 
   echo "Foreground: stopping background process before quitting" 
   echo "Foreground: killing background pid $bgpid"
   kill -9 $bgpid
fi 
echo "Foreground: pid $$ finished"
======================== end of tscript =========================

The script has 18 lines: if you see fewer, this will be due to some lines 
having been combined by your newsreader, so descramble this version 
before trying to run it.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-26 17:38 +0000
  Re: HOW2 capture time of power-failure? Ian Malcolm <See.My.Sig.for.email@totally.invalid> - 2014-10-26 18:26 +0000
    Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-27 18:10 +0000
      Re: HOW2 capture time of power-failure? Gordon Henderson <gordon+usenet@drogon.net> - 2014-10-27 18:29 +0000
        Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-28 21:26 +0000
      Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-10-28 04:56 +0000
        Re: HOW2 capture time of power-failure? Dom <domafp@blueyonder.co.uk> - 2014-10-28 06:29 +0000
          Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-10-28 06:41 +0000
            Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-29 00:12 +0000
  Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-10-26 19:23 +0000
    Re: HOW2 capture time of power-failure? spam-no-spam@Freeola.net.invalid (Windmill) - 2014-11-04 13:19 +0000
      Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-11-05 21:56 +0000
        Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-11-06 14:12 +0000
        Re: HOW2 capture time of power-failure? nba@users.sourceforge.net (Niels Baggesen) - 2014-11-06 16:15 +0100
          Re: HOW2 capture time of power-failure? William Unruh <unruh@invalid.ca> - 2014-11-06 16:00 +0000
        Re: HOW2 capture time of power-failure? spam-no-spam@Freeola.net.invalid (Windmill) - 2014-11-06 20:37 +0000
      Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-11-06 14:13 +0000
  Re: HOW2 capture time of power-failure? andrew@cucumber.demon.co.uk (Andrew Gabriel) - 2014-10-26 20:28 +0000
  Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-10-27 13:17 +0000
  Re: HOW2 capture time of power-failure? Jean-David Beyer <jeandavid8@verizon.net> - 2014-10-28 13:43 -0400
    Re: HOW2 capture time of power-failure? Ant <ant@zimage.comANT> - 2014-10-29 08:18 -0700
  Re: HOW2 capture time of power-failure? Joe Beanfish <joebeanfish@nospam.duh> - 2014-10-29 13:28 +0000
    Re: HOW2 capture time of power-failure? not.socialnetwork@gmail.com - 2014-10-30 08:32 +0000
      background processes (was HOW2 capture time of power-failure?) Joe Beanfish <joebeanfish@nospam.duh> - 2014-10-30 13:16 +0000
        Re: background processes (was HOW2 capture time of power-failure?) not.socialnetwork@gmail.com - 2014-11-03 03:25 +0000
          Re: background processes (was HOW2 capture time of power-failure?) "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2014-11-02 23:34 -0500
          Re: background processes (was HOW2 capture time of power-failure?) William Unruh <unruh@invalid.ca> - 2014-11-03 08:25 +0000
          Re: background processes (was HOW2 capture time of power-failure?) Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-03 12:56 +0000
            Re: background processes (was HOW2 capture time of power-failure?) not.socialnetwork@gmail.com - 2014-11-06 19:19 +0000
              Re: background processes (was HOW2 capture time of power-failure?) Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-07 02:36 +0000
              Re: background processes (was HOW2 capture time of power-failure?) Joe Beanfish <joebeanfish@nospam.duh> - 2014-11-07 14:28 +0000
                Re: background processes (was HOW2 capture time of power-failure?) not.socialnetwork@gmail.com - 2014-11-08 03:32 +0000

csiph-web