Re: =?iso-8859-1?Q?variable=3DStrart=5FProgramPID =3F=3F?=

From: pir aa (pir_at_austromail.at)
Date: 11/25/04

  • Next message: Andrew Ingram: "Can't run kdm, but gdm is fine"
    Date: Thu, 25 Nov 2004 09:27:28 +0100
    To: swatkins@fastmail.fm, debian-user@lists.debian.org
    
    

    Thanks,

    You are right it is $! but my question that this throws up, is, if when
    running x scripts the $! could return at some time the pid of a wrong command.
    What I mean:
    Imagine having two scripts (I know ls and df don't run long enough, it is just
    used as an example):
    1.)
    ls
    pid1s=$!
    kill $pid1s

    2.)
    df
    piddf=$!
    kill $piddf

    Now could it ever happen, if there would run really many of these scripts,
    that you could end up with something like this:
    df
    pidls=$!

    ??

    (Now I am using "pkill -f" for my scipt)

    Pir

    ---
    Alles Kaufen und Verkaufen! eBay.at - der eigene Marktplatz für Österreich.
    http://www.austronaut.at/ebay.php

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Andrew Ingram: "Can't run kdm, but gdm is fine"

    Relevant Pages

    • Root: Cannot kill own process...
      ... Now the thing is, that kill doesn't kill. ... could "destroy" root processes, but still, "ip-down" ... was not able to stop the ping. ... but from the scripts, I can't. ...
      (comp.os.linux.security)
    • Re: All New rc2.d Scripts get Ignored. Debian from KNOPPIX Solved!
      ... kill or start scripts in each rc directory. ... came up on boot for the first time on the next boot. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: (AIX 5L) (NOT A) MYTH: Shutdown scripts can be placed in /etc/rc.d/rcX.d
      ... Thanks to Casey and J.J. for their excellent replies. ... calling only the kill scripts. ... In looking at the shutdown script, it appears as I read it that the ...
      (comp.unix.aix)
    • Re: Random pids being "16113 Killed "
      ... a script or some other process that is looking for a pattern and ... any "kill" logic involved. ... Having written similar scripts in the past, ... None of the processes run as root. ...
      (comp.unix.solaris)
    • Re: Why does /etc/rc.d/rc work the way it does?
      ... ]>> from the current level and then start scripts from the new level. ... it runs both the kill scripts and start scripts from the new level. ... For example level 3 has networking and level 2 does not. ... in all runlevels. ...
      (comp.os.linux.setup)