How do I make a process a daemon? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have some commands or processes that need to be turned into daemons in my system. I have tried using nohup, but it is not working for processes.



How can I make a process a daemon?







share|improve this question














closed as unclear what you're asking by G-Man, muru, taliezin, GAD3R, sebasth Nov 6 '17 at 10:37


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    What is unclear about this question? Genuinely curious.
    – Johan Myréen
    Nov 6 '17 at 11:00










  • What exactly have you tried and what exactly didn't work? The normal way to start a daemon (or in general a process which you want to become a daemon) is to run it from an init script / systemd service unit.
    – AlexP
    Nov 6 '17 at 12:40










  • @AlexP Note that I didn't ask the question, I answered it. My answer mentioned a systemd unit, but even after the answer was posted the question got most of the close votes. Btw. running a program from an init script does not make it a daemon, you need code in the program to daemonize the program, or use systemd which does that for you.
    – Johan Myréen
    Nov 7 '17 at 7:44










  • @JohanMyréen: I apologize for my error.
    – AlexP
    Nov 7 '17 at 10:06














up vote
0
down vote

favorite












I have some commands or processes that need to be turned into daemons in my system. I have tried using nohup, but it is not working for processes.



How can I make a process a daemon?







share|improve this question














closed as unclear what you're asking by G-Man, muru, taliezin, GAD3R, sebasth Nov 6 '17 at 10:37


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    What is unclear about this question? Genuinely curious.
    – Johan Myréen
    Nov 6 '17 at 11:00










  • What exactly have you tried and what exactly didn't work? The normal way to start a daemon (or in general a process which you want to become a daemon) is to run it from an init script / systemd service unit.
    – AlexP
    Nov 6 '17 at 12:40










  • @AlexP Note that I didn't ask the question, I answered it. My answer mentioned a systemd unit, but even after the answer was posted the question got most of the close votes. Btw. running a program from an init script does not make it a daemon, you need code in the program to daemonize the program, or use systemd which does that for you.
    – Johan Myréen
    Nov 7 '17 at 7:44










  • @JohanMyréen: I apologize for my error.
    – AlexP
    Nov 7 '17 at 10:06












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have some commands or processes that need to be turned into daemons in my system. I have tried using nohup, but it is not working for processes.



How can I make a process a daemon?







share|improve this question














I have some commands or processes that need to be turned into daemons in my system. I have tried using nohup, but it is not working for processes.



How can I make a process a daemon?









share|improve this question













share|improve this question




share|improve this question








edited Nov 6 '17 at 7:53









kiamlaluno

362220




362220










asked Nov 6 '17 at 6:01









user259156

1




1




closed as unclear what you're asking by G-Man, muru, taliezin, GAD3R, sebasth Nov 6 '17 at 10:37


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by G-Man, muru, taliezin, GAD3R, sebasth Nov 6 '17 at 10:37


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 1




    What is unclear about this question? Genuinely curious.
    – Johan Myréen
    Nov 6 '17 at 11:00










  • What exactly have you tried and what exactly didn't work? The normal way to start a daemon (or in general a process which you want to become a daemon) is to run it from an init script / systemd service unit.
    – AlexP
    Nov 6 '17 at 12:40










  • @AlexP Note that I didn't ask the question, I answered it. My answer mentioned a systemd unit, but even after the answer was posted the question got most of the close votes. Btw. running a program from an init script does not make it a daemon, you need code in the program to daemonize the program, or use systemd which does that for you.
    – Johan Myréen
    Nov 7 '17 at 7:44










  • @JohanMyréen: I apologize for my error.
    – AlexP
    Nov 7 '17 at 10:06












  • 1




    What is unclear about this question? Genuinely curious.
    – Johan Myréen
    Nov 6 '17 at 11:00










  • What exactly have you tried and what exactly didn't work? The normal way to start a daemon (or in general a process which you want to become a daemon) is to run it from an init script / systemd service unit.
    – AlexP
    Nov 6 '17 at 12:40










  • @AlexP Note that I didn't ask the question, I answered it. My answer mentioned a systemd unit, but even after the answer was posted the question got most of the close votes. Btw. running a program from an init script does not make it a daemon, you need code in the program to daemonize the program, or use systemd which does that for you.
    – Johan Myréen
    Nov 7 '17 at 7:44










  • @JohanMyréen: I apologize for my error.
    – AlexP
    Nov 7 '17 at 10:06







1




1




What is unclear about this question? Genuinely curious.
– Johan Myréen
Nov 6 '17 at 11:00




What is unclear about this question? Genuinely curious.
– Johan Myréen
Nov 6 '17 at 11:00












What exactly have you tried and what exactly didn't work? The normal way to start a daemon (or in general a process which you want to become a daemon) is to run it from an init script / systemd service unit.
– AlexP
Nov 6 '17 at 12:40




What exactly have you tried and what exactly didn't work? The normal way to start a daemon (or in general a process which you want to become a daemon) is to run it from an init script / systemd service unit.
– AlexP
Nov 6 '17 at 12:40












@AlexP Note that I didn't ask the question, I answered it. My answer mentioned a systemd unit, but even after the answer was posted the question got most of the close votes. Btw. running a program from an init script does not make it a daemon, you need code in the program to daemonize the program, or use systemd which does that for you.
– Johan Myréen
Nov 7 '17 at 7:44




@AlexP Note that I didn't ask the question, I answered it. My answer mentioned a systemd unit, but even after the answer was posted the question got most of the close votes. Btw. running a program from an init script does not make it a daemon, you need code in the program to daemonize the program, or use systemd which does that for you.
– Johan Myréen
Nov 7 '17 at 7:44












@JohanMyréen: I apologize for my error.
– AlexP
Nov 7 '17 at 10:06




@JohanMyréen: I apologize for my error.
– AlexP
Nov 7 '17 at 10:06










1 Answer
1






active

oldest

votes

















up vote
2
down vote













The simplest way is to define a Systemd service unit. Systemd takes care of what needs to be done. If you don't want to go that route, take a look at the daemon library function.






share|improve this answer



























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    The simplest way is to define a Systemd service unit. Systemd takes care of what needs to be done. If you don't want to go that route, take a look at the daemon library function.






    share|improve this answer
























      up vote
      2
      down vote













      The simplest way is to define a Systemd service unit. Systemd takes care of what needs to be done. If you don't want to go that route, take a look at the daemon library function.






      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        The simplest way is to define a Systemd service unit. Systemd takes care of what needs to be done. If you don't want to go that route, take a look at the daemon library function.






        share|improve this answer












        The simplest way is to define a Systemd service unit. Systemd takes care of what needs to be done. If you don't want to go that route, take a look at the daemon library function.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 6 '17 at 6:58









        Johan Myréen

        6,93711322




        6,93711322












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay