Re: [SLE] How to spawn another shell script in separate process

From: Carl William Spitzer IV (cwsiv_at_juno.com)
Date: 10/19/03

  • Next message: Carl William Spitzer IV: "Re: [SLE] The further adventures of DOS and Suse 8.2"
    To: suse-linux-e@suse.com
    Date: Sat, 18 Oct 2003 21:49:25 PDT
    
    

    Does bash allow for functions?
    CWSIV

    On Fri, 17 Oct 2003 12:26:26 -0700 Kastus <NOSPAM@tprfct.net> writes:

    >Parent process DOES exit. Please try yourself the following example:
    >
    >a.sh:
    >--------------------------------
    >#!/bin/bash
    >date
    >echo in a.sh before calling b.sh
    >echo a.sh runs as PID $$
    >./b.sh &
    >date
    >echo b.sh started in background
    >-------------------------------
    >
    >b.sh:
    >------------------------------
    >#!/bin/bash
    >echo running sleep...
    >sleep 20
    >echo back from sleep
    >-----------------------------
    >
    >kastus@kastus:~> ./a.sh
    >Fri Oct 17 12:21:48 PDT 2003
    >in a.sh before calling b.sh
    >a.sh runs as PID 6732
    >Fri Oct 17 12:21:48 PDT 2003
    >b.sh started in background
    >kastus@kastus:~> running sleep...
    >
    >kastus@kastus:~> ps x |grep 6732
     

    ________________________________________________________________
    The best thing to hit the internet in years - Juno SpeedBand!
    Surf the web up to FIVE TIMES FASTER!
    Only $14.95/ month - visit www.juno.com to sign up today!

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Carl William Spitzer IV: "Re: [SLE] The further adventures of DOS and Suse 8.2"

    Relevant Pages

    • Re: Checking for hung processes or time limit exceeded?
      ... echo "Process has hung!" ... I am not really clear, but if you want to launch a process, sleep for 30 seconds and then check if the process is still available and if so kill it, you could do the following. ... kill -9 $PID ... echo "Killing process because it exceeded its CPU limit" ...
      (comp.unix.solaris)
    • Re: "flush queue mode requires no recipient"
      ... Sendmail is a Mail Transport Agent, ... Look *only* at the pid file. ... echo $"Usage: pidfileofproc " ... trap "" SIGPIPE ...
      (comp.mail.sendmail)
    • Re: using wait within while loop
      ... echo PID=$PID ... while [wait $PID] ... The while loop will terminate straight away. ... so the script will do a "sleep 1". ...
      (comp.unix.shell)
    • Re: Taskkill & displaying printer problem
      ... for instance if he wants to kill ... PID 456 then all he has to type in is the PID, ... @echo off ... rem * Utility to kill off CPU-hogging * ...
      (microsoft.public.windowsxp.customize)
    • Re: Taskkill & displaying printer problem
      ... After the task list is displayed, you are prompted to enter a PID from the above list (use the mouse wheel to scroll up and down the list to identify the Application / PID you want to terminate). ... @echo off ... goto TERMINATE ...
      (microsoft.public.windowsxp.customize)