Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
952 views
in Technique[技术] by (71.8m points)

ubuntu - How to stop a Daemon Server in Rails?

I am running my rails application using the following

  $script/server -d webrick 

on my Ubuntu system , above command run the webrick server in background . I could kill the process using kill command

  $kill pid

Does rails provide any command to stop the background running daemon server ?

like the one provided by rails to start the server , Thanks .

EDIT When it is appropriate to start the daemon server ? Any real time scenario will help Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

if it can be useful, on linux you can find which process is using a port (in this case 3000) you can use:

lsof -i :3000

it'll return the pid too


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...