Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PID recorded on AWS EC2 at startup was wrong. #30

Open
funmu opened this issue Feb 5, 2016 · 3 comments
Open

PID recorded on AWS EC2 at startup was wrong. #30

funmu opened this issue Feb 5, 2016 · 3 comments

Comments

@funmu
Copy link

funmu commented Feb 5, 2016

One more issue:
the PID recorded for the node-startup app is pointing to the bash shell used to start the script instead of referencing the node app that is actually running.

why would this happen? And how can I fix it?

@ralyodio
Copy link
Owner

ralyodio commented Feb 5, 2016

looks like $! isn't being set properly.

@funmu
Copy link
Author

funmu commented Feb 5, 2016

here is the line of code that is doing it.

is there a race condition of sorts between when the $! is fetched and when
the node process is launched?

echo "cd $APP_DIR && PORT=$PORT NODE_ENV=$NODE_ENV
NODE_CONFIG_DIR=$CONFIG_DIR $NODE_EXEC $APP_DIR/$NODE_APP 1>$LOG_FILE 2>&1
& *echo $! *> $PID_FILE" | sudo -i -u $USER

On Fri, Feb 5, 2016 at 12:32 PM, Anthony Ettinger notifications@github.com
wrote:

looks like $! isn't being set properly.


Reply to this email directly or view it on GitHub
#30 (comment).

@FossPrime
Copy link
Contributor

@funmu It's been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants