2

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.

6
  • 2
    Get the PID of that process, then run pstree -ps PID, and add the output to the question.
    – muru
    Jan 19, 2015 at 14:35
  • 2
    Additionally, 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.
    – muru
    Jan 19, 2015 at 14:38
  • Thanks @muru - pstree shows this process as parent to start_pms which itself is responsible for starting the Plex Media Server. Not sure how I've survived this long without knowing pstree! Solved.
    – pbhj
    Jan 19, 2015 at 17:21
  • You may want to adjust the Upstart job for Plex to exec start_pms so that this extraneous shell process does not hang around. Jan 19, 2015 at 17:42
  • @CameronNemo - I don't know enough about why this is started, nor indeed how. Have added gist link for start_pms (a shell script).
    – pbhj
    Jan 19, 2015 at 18:41

0

You must log in to answer this question.

Browse other questions tagged .