Talk:Run as a daemon or service: Difference between revisions

Content added Content deleted
(→‎A different angle: new section)
Line 49: Line 49:
:::: Meanwhile, if you are not running the program from the shell, there is no reason to detach it from the shell context. --[[User:Rdm|Rdm]] 17:50, 17 November 2011 (UTC)
:::: Meanwhile, if you are not running the program from the shell, there is no reason to detach it from the shell context. --[[User:Rdm|Rdm]] 17:50, 17 November 2011 (UTC)
::::: true. with a modern init system this is not needed, but it is nice to have the option and none of the arguments given here show that being able to detach from the terminal is inherently bad, nor has anyone yet explained that we shouldn't document capabilities that do exist. however all comments so far center on a solution which is outside of the scope of rosettacode because it has nothing to do with language comparison if we use a shellscript to solve the problem for any language. the shell solution will have its place in the [[UNIX Shell]] section.--[[User:EMBee|eMBee]] 18:09, 17 November 2011 (UTC)
::::: true. with a modern init system this is not needed, but it is nice to have the option and none of the arguments given here show that being able to detach from the terminal is inherently bad, nor has anyone yet explained that we shouldn't document capabilities that do exist. however all comments so far center on a solution which is outside of the scope of rosettacode because it has nothing to do with language comparison if we use a shellscript to solve the problem for any language. the shell solution will have its place in the [[UNIX Shell]] section.--[[User:EMBee|eMBee]] 18:09, 17 November 2011 (UTC)

== A different angle ==

i'd like to restart the discussion from a different angle. instead of discussing a solution which is beyond the scope of rosettacode, i'd like to ask this direct question:

* is this task suitable for rosettacode?

if the discussion until now is any indication then the answer is ''no''.

however i'd disagree with that.
* the capability to disconnect from a tty and to redirect or close stdout,stderr,stdin from within a process does exist in more than one language so it is worth demonstrating it.
* this method of writing daemons has been used traditionally for a long time. a search for "how to write a unix daemon" has most links on the first result pages point to resources that explain just this method and do not talk about shell scripts. and it not only works on unix. (DOS TSR comes to mind)
* using a shell script is a very unix centric solution whereas an in-language solution is likely more portable.
--[[User:EMBee|eMBee]] 18:23, 17 November 2011 (UTC)