AIX Open Source

 View Only
  • 1.  /tmp/sh-np.xxxxxx remains

    Posted Wed June 16, 2021 01:08 AM
    AIX 7.2 TL4SP2 bash-5.0-1

    The zero byte file of sh-np.xxxxxx remains under / tmp.
    There are many similar files.
    When I use bash, the number of files increases, but the cause of the files remaining is unknown.
    Is there any workaround?

    Example) Under / tmp
    prw ------- 1 oracle oinstall 0 Feb 17 20:26 sh-np.1rmMqb
    prw ------- 1 oracle oinstall 0 Feb 17 20:27 sh-np.MJmMqb
    prw ------- 1 oracle oinstall 0 Feb 17 20:27 sh-np.hroMAb
    prw ------- 1 oracle oinstall 0 Feb 17 20:27 sh-np.4Jtamb
    prw ------- 1 oracle oinstall 0 Feb 17 20:27 sh-np.Qjtqib
    prw ------- 1 oracle oinstall 0 Feb 17 20:27 sh-np.kJpqeb

    ------------------------------
    YUHJI KAI
    ------------------------------


  • 2.  RE: /tmp/sh-np.xxxxxx remains

    Posted Wed June 16, 2021 01:26 AM
    Owned by Oracle, perhaps a cron job?




  • 3.  RE: /tmp/sh-np.xxxxxx remains

    IBM Champion
    Posted Wed June 16, 2021 09:14 AM
    Bash creates FIFOs (named pipes) for subshells, but isn't the best about cleaning them up. Note that the first character in the mode info is a 'p' for pipe.

    This is a very long standing issue with the way bash deals with those files. You should be able to clean them up at your discretion. Some other implementations create the pipe and then unlink it after the child process opens it (so they go away after the last close()). It is probably safe to delete any of the files with that pattern that are there. If you want to delete "old" ones, that would likely be fine, too.

    -- 
    Stephen L. Ulmer
    Enterprise Architect
    Mainline Information Systems
    (m) 352-870-8649