SUMMARY: Child PID

From: Zander, Mark (Mark.Zander@mezzia.com)
Date: Wed Nov 29 2000 - 09:48:33 CST


Thanks to:

Charles Brian Hill [brian@doodlabs.com]
Ernst-Gunar Ortlepp [ortlepp@dkrz.de]
Sam Nelson [Sam.Nelson@cs.stir.ac.uk]
Chang, Sam [sam.chang@gs.com]
mike.salehi@kodak.com
Paul LaMadeleine [plamadeleine@lightbridge.com]

The answer I needed was to:

If you're doing this in shell, and you're executing your command in the
background, $! will be set to the PID of the child process immediately
following its execution.

(for example)

#!/bin/sh
sleep 3600 &
sleep_pid=$!
echo $sleep_pid
??

Thanks!!

-----
Mark Zander ===> Mark.Zander@mezzia.com
Unix System Admin
mezzia e-business
Indianapolis, IN USA
Third Stone From The Sun
http://www.mezzia.com
-----
All opinions expressed are my own and not that of Mezzia.
-----
"Many times I've wondered how much there is to know."
Led Zepplin
S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@sunmanagers.ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:24 CDT