<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Richard Ham wrote:<br>
<blockquote type="cite"
cite="mid004401c386d2$689bf010$09da0bcb@sparhawk">
<blockquote type="cite">
<pre wrap="">Benjamin PRACHT <a class="moz-txt-link-rfc2396E" href="mailto:bigben@via.ecp.fr"><bigben@via.ecp.fr></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">scripts languages (such as perl) allows to get the pid of a
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->spawned
</pre>
<blockquote type="cite">
<pre wrap="">i did something like this this weekend.
</pre>
</blockquote>
<pre wrap=""><!---->
Stunning! Thats spot on for my needs!!!
If thats the quick version, I'd love to see the full script!! (Like an
artist at work!)
Many thanks,
Richard
</pre>
</blockquote>
In bash, I just do:<br>
<br>
myprocess >& logerrs &<br>
echo $! > /var/run/myprocess.pid<br>
<br>
were $! is the pid of the just backgrounded process<br>
$$ is the pid of the current process<br>
Perl allows $PID as a synonym for $$<br>
<br>
</body>
</html>