linux-l: Warten auf Prozesse?

Harald Boehme boehme at informatik.hu-berlin.de
Mo Jun 15 11:08:11 CEST 1998


Hi Leut

> Verbindung aufbauen
> 
> Mache gleichzeitig
> {
>   Zeitsynchronisation
>   Mails abholen
>   Mails schicken
>   News aktualisieren
>   RC5 Bloecke holen und abgeben
> }
> 
> Verbindung abbauen.
> 
> Gibt es Shells, die sowas unterstuetzen und wenn wie?
ja Bourn-Shell oder bash

> Oder muss man zu C greifen und sich ein Programm Namens "concurrent"
> schreiben, das mittels fork() und system() und wait() das ganze erledigt?
nein

#! /bin/sh

Verbindung aufbauen
 
   Zeitsynchronisation &
   Mails abholen &
   Mails schicken &
   News aktualisieren &
   RC5 Bloecke holen und abgeben &

wait

Verbindung abbauen.

Hier der entsprechende Teil aus der bash-man-page:

       wait [n]
              Wait  for the specified process and return its ter-
              mination status.  n may be a process ID  or  a  job
              specification;  if  a  job  spec is given, all pro-
              cesses in that job's pipeline are waited for.  If n
              is  not given, all currently active child processes
              are waited for, and the return status is zero.   If
              n  specifies  a  non-existant  process  or job, the
              return status is 127.  Otherwise, the return status
              is  the  exit  status  of  the  last process or job
              waited for.
MvG
		Harald
-- 
       <<<<              Harald Böhme, Berlin 10115          >>>>
      <<<<         Schöhnholzer Str. 19                     >>>>
     <<<<     boehme at informatik.hu-berlin.de                >>>>




Mehr Informationen über die Mailingliste linux-l