I have a peculiar issue when starting ongoing(service-like) processes from either full blown init.d script (SysV style) or a simple one-line call from rc.local file like so:
su someuser -c "/home/someuser/watchdog.sh &"
Where watchdog.sh contains this:
#!/bin/bash cd /home/someuser until ./eventMonitoring.py do echo "Program crashed with exit code $?. Starting again..." >&2 sleep 1 done
I'm always left with one additional process in the processes list:
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD root 3048 1 0 1024 620 1 20:04 ? 00:00:00 startpar -f -- rc.local
If I launch it from my init.d script(source: https://github.com/ivankovacevic/userspaceServices)
I get the same process but it is startpar -f -- userspaceServices
What the heck is that process? Why is there no mention of -f argument when looking at the man page of startpar? What am I doing wrong in terms of starting a process at boot as another user, that this strange startpar process needs to be left(or started) also? Why is that process not present for any other init.d script?
Can someone please help me shed some light on this subject?
Note: My system is Debian Wheezy 7.4.0
I've opened a new question on stackoverflow to discuss startpar behaviour from a programmers point of view: