Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#251 getpid() function fails on paths with []

v3.5.7
closed-fixed
5
2013-04-05
2010-12-13
Sander Koning
No

One of our QA employees found a small bug in the getpid() function in the Unix startup script.
If the application is started from a path containing square brackets, the getpid() function doesn't correctly find the PID of the running application.
This is caused by the call to 'grep' in the line
pidtest=`$PSEXE -p $pid -o args | grep "$WRAPPER_CMD" | tail -1`
where the square brackets in the path (in $WRAPPER_CMD) are interpreted by grep.

Suggested fix: add '-F' to the call to 'grep' (or escape all non-alphanumeric chars?).

Discussion

  • Sander,

    thank you very much for your contribution.

    I will review the getpid function and check your suggested solution ("-F"). I first want to make sure that the option is actually available on all of the platforms we support.

    Cheers,
    Christian

     
  • Sander,
    I'm very sorry for the delay on replying to this issue.

    We released 3.5.7 yesterday also containing the fix for the problem you described here.

    Cheers,
    christian

     
    • status: open --> closed-fixed
    • assigned_to: Christian Mueller
    • milestone: --> v3.5.7