I have a process /bin/sh -e /proc/self/fd/9
that runs on my system. sh -e /path/to/file
in dash (which sh
is symlinked to on my Kubuntu 14.10) just tests for existence of a file. In /proc/self/fs
I have files 1, 2, 3, 4 but no 9. From googling it seems it might be to do with upstart?
So what process is starting this and/or why? Thanks.
Edit - pstree output:
k1210:~$ pstree -ps 1890
init(1)───sh(1890)───start_pms(1902)───Plex Media Serv(1905)─┬─python(1926)─┬─{python}
[...]
Edit 2 - start_pms shell script:
https://gist.github.com/pbhj/777a191a55491bf432eb
Edit 3 - init.d file for plex:
https://gist.github.com/pbhj/bfb4a2303e727124efbc
Sufficient info has been provided however for my curiousity as to which service/app was causing the process to be created, ie "it's part of plex". Thanks.
pstree -ps PID
, and add the output to the question.test -e
tests for existence.sh -e
is used to exit if an unchecked command returns a non-zero exit code. What this command does is read in commands from this file descriptor, and/proc/self
refers to the current command, so when you do check/proc/self/fd
, you're not checking the file descriptors of that process.start_pms
which itself is responsible for starting the Plex Media Server. Not sure how I've survived this long without knowing pstree! Solved.exec
start_pms so that this extraneous shell process does not hang around.