Closed espadrine closed 12 years ago
@jankeromnes what does "work" mean? Can you be more specific about what you see?
Did you see my comment about make
putting the process in the background from now on?
Oh ok, that explains it. But I believe this is not an intuitive output:
$ make PORT=4561
stop
start
$ #???
What do you expect?
$ make PORT=4224
stop
start
no, really, it's started, you can look at it!
$
Well there is absolutely no difference between the output when it crashes and the output when it actually works.
When it crashes, it's supposed to print the error message. Do you have a case of a crash without any error message?
Also the .pid
file is still created if the server crashes, and the next time you do make
it will say kill: No such process
.
For instance, on this machine I have apache running on port 80. I do:
$ make
stop
start
$ # the server is not started because port 80 is taken
Afterwards, I realize my mistake, and do:
$ make PORT=7894
stop
kill: No such process
start
sh: tree.log: Permission denied # unrelated error fixed by this pull request
@jankeromnes can you pull the commit corresponding to this very pull request (not to be confused with issue #141) and tell me whether the tree.log: Permission denied
error persists?
I'll look at trying to detect whether the port is taken.
It seems that the empty line after start
means that there was an error. Additional issue, the Makefile doesn't auto-prompt for sudo password anymore:
$ make PORT=81
stop
start
$ # no can do
EDIT: but I can confirm this pull request solves the tree.log
issue.
The fact that the Makefile doesn't prompt for sudo when it doesn't need to is something I worked quite hard to achieve.
Are you sure it prompts every time it really needs it?
yep.
It turns out it reprompts when you redirect its command's stdout and stderr, which can be tricked (which I did).
I believe this is caused by sudo
using those to keep a reference to the corresponding process it spawns.
then in you I trust
I still don't understand how you and @davidaparicio manage to make it work. I can't believe it currently works on thefiletree.com.
On my machine, it says
stop start
and then crashes. I made a fresh clone ofgarden
on thefiletree.com's server (foldergarden
). When I domake
ormake PORT=7894
or whatever, it never works. @espadrine can you check?