Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8561205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:27:02+00:00 2026-06-11T16:27:02+00:00

I have recently completed the Wiki web development tutorial ( http://golang.org/doc/articles/wiki/ ). I had

  • 0

I have recently completed the Wiki web development tutorial (http://golang.org/doc/articles/wiki/). I had tons of fun and I would like to experiment more with the net/http package.

However, I noticed that when I run the wiki from a console, the wiki takes over the console. If I close the console terminal or stop the process with CTRL+Z then the server stops.

How can I get the server to run in the background? I think the term for that is running in a daemon.

I’m running this on Ubuntu 12.04. Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:27:04+00:00Added an answer on June 11, 2026 at 4:27 pm

    Simple / Usable things first

    If you want a start script without much effort (i.e. dealing with the process, just having it managed by the system), you could create a systemd service. See Greg’s answer for a detailled description on how to do that.
    Afterwards you can start the service with

    systemctl start myserver
    

    Previously I would have recommended trying xinetd or something similar for finer granuarlity regarding resource and permission management but systemd already covers that.

    Using the shell

    You could start your process like this:

    nohup ./myexecutable &
    

    The & tells the shell to start the command in the background, keeping it in the job list.
    On some shells, the job is killed if the parent shell exits using the HANGUP signal.
    To prevent this, you can launch your command using the nohup command, which discards the HANGUP signal.

    However, this does not work, if the called process reconnects the HANGUP signal.

    To be really sure, you need to remove the process from the shell’s joblist.
    For two well known shells this can be achieved as follows:

    bash:

    ./myexecutable &
    disown <pid>
    

    zsh:

    ./myexecutable &!
    

    Killing your background job

    Normally, the shell prints the PID of the process, which then can be killed using the kill command, to stop the server. If your shell does not print the PID, you can get it using

    echo $!
    

    directly after execution. This prints the PID of the forked process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've started learning Rails recently and have completed the sample app at http://ruby.railstutorial.org .
Recently i completed on mid level web application where i have used telerik controls,
I have recently completed development on a game for Android smartphones. It was designed
I've been away from web design/development for a long, long now and have recently
Iam a web-developer and recently i have completed and launched a website (im using
I have recently completed a detailed investigation regarding GP functional test automation possibilities with
I have recently had a linux server compromised from bots uploading .php scripts and
I am just beginning on emacs, and have just completed the tutorial. As a
I am 'relatively new' to unit-testing and TDD. Only more recently have I completed
I have recently completed the following interview exercise: 'A robot can be programmed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.