erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

append the user name to the pipe dirname #542

Closed getong closed 7 years ago

getong commented 7 years ago

In some cases, the first time, the root user run the command, and create the pipe dir in the /tmp directory. And then, the other user can not run the command any more and fail sliently, without any error report. It is because the other user can not recreate the dir as the root has created it. To avoid this, just append the user name append the pipe dirname, and every user creates their own pipe dirs themselves.

lrascao commented 7 years ago

This is a nice feature to add, perhaps we could have a PIPE_NAME env variable that defaults to $USER to allow redefinition to something else

getong commented 7 years ago

@lrascao Add the PIPE_NAME env as you suggested.

lrascao commented 7 years ago

@getong so i gave this a try, won't this mean that no other user will be able to attach to a node started by root? that would break existing behaviour that people are already used to. instead of creating a pipe for each user we could simply print an error when the user is unable to re-create it, what are your thoughts?

getong commented 7 years ago

@lrascao I fix the code, just check the mkdir result. If fail, then aborted.