Linux init script
Hello everyone, I'm trying to write a Linux init script for a Pharo application. I'm using a bash script wrapper to launch pharo. This script executes the pharo script provided by get.pharo.org. This is my wrapper script: #! /bin/bash cd "$(dirname "$0")" ./pharo myapp.image start.st & PID=$! echo $PID > /var/run/myapp.pid The following process tree is created:  ââbash,692 ./pharo myapp.image start.st  â  ââpharo,701 --nodisplay myapp.image start.st  â      ââ{pharo},730 And a /var/run/myapp.pid file is written with 692. Ok. The problem is that when I kill the process with pid 692 the process with pid 701 is not terminated. Any idea on how I can terminate the whole process tree? Best regards, Sebastián Filippini
On 10/07/19 10:30 PM, Sebastián Filippini wrote:
Hello everyone,
I'm trying to write a Linux init script for a Pharo application. I'm using a bash script wrapper to launch pharo. This script executes the pharo script provided by get.pharo.org.
./pharo myapp.image start.st & PID=$! echo $PID > /var/run/myapp.pid
You could try direct exec instead of spawning a subshell. E.g. echo $$ >/var/run/myapp.id exec ./pharo myapp.image start.st HTH .. Subbu
participants (2)
-
K K Subbu -
Sebastián Filippini