On 20.06.2011 15:59, Mladen Turk wrote: > On 06/20/2011 03:12 PM, Rainer Jung wrote: >> >>> ... and >>> We eval for start/stop so we can get the pid. >> >> And this is broken now. We used $! with exec and we still use it with >> eval. But with eval $! returns the pid of a child shell and the java >> process id a child of that pid. >> > > Are you sure? > > cat <<EOF >foo.sh > #!/bin/sh > eval sleep "\$@" "&" > echo "Sleep pid: \$!" > exit 0 > EOF > > [mturk@fc14x86v0 Temp]$ sh foo.sh 30 > Sleep pid: 3998 > [mturk@fc14x86v0 Temp]$ ps -ef | grep sleep > ... > mturk 3998 1 0 15:58 pts/3 00:00:00 sleep 30 > ...
Aaaah, the fine difference between & and "&" ... OK, point about PID and about eval exec taken back. Thanks, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org