You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "David North (JIRA)" <ji...@apache.org> on 2012/11/01 14:57:13 UTC

[jira] [Created] (DAEMON-264) Change current working directory to / when daemonising

David North created DAEMON-264:
----------------------------------

             Summary: Change current working directory to / when daemonising
                 Key: DAEMON-264
                 URL: https://issues.apache.org/jira/browse/DAEMON-264
             Project: Commons Daemon
          Issue Type: Improvement
          Components: Jsvc
    Affects Versions: 1.0.10
         Environment: Linux
            Reporter: David North
            Priority: Minor


It's good practice for daemons to change their current working directory to / as this ensures they don't prevent file systems being mounted/unmounted by having a cwd wherever their controlling terminal was when it spawned them.

It would be great if jsvc could chdir to / when detatching from its controlling terminal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DAEMON-264) Change current working directory to / when daemonising

Posted by "Mladen Turk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mladen Turk updated DAEMON-264:
-------------------------------

    Issue Type: New Feature  (was: Improvement)
    
> Change current working directory to / when daemonising
> ------------------------------------------------------
>
>                 Key: DAEMON-264
>                 URL: https://issues.apache.org/jira/browse/DAEMON-264
>             Project: Commons Daemon
>          Issue Type: New Feature
>          Components: Jsvc
>    Affects Versions: 1.0.10
>         Environment: Linux
>            Reporter: David North
>            Priority: Minor
>             Fix For: 1.0.11
>
>
> It's good practice for daemons to change their current working directory to / as this ensures they don't prevent file systems being mounted/unmounted by having a cwd wherever their controlling terminal was when it spawned them.
> It would be great if jsvc could chdir to / when detatching from its controlling terminal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (DAEMON-264) Change current working directory to / when daemonising

Posted by "Mladen Turk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mladen Turk resolved DAEMON-264.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.11

Added -cwd parameter which defaults to "/".
So chdir is always executed.
                
> Change current working directory to / when daemonising
> ------------------------------------------------------
>
>                 Key: DAEMON-264
>                 URL: https://issues.apache.org/jira/browse/DAEMON-264
>             Project: Commons Daemon
>          Issue Type: Improvement
>          Components: Jsvc
>    Affects Versions: 1.0.10
>         Environment: Linux
>            Reporter: David North
>            Priority: Minor
>             Fix For: 1.0.11
>
>
> It's good practice for daemons to change their current working directory to / as this ensures they don't prevent file systems being mounted/unmounted by having a cwd wherever their controlling terminal was when it spawned them.
> It would be great if jsvc could chdir to / when detatching from its controlling terminal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DAEMON-264) Change current working directory to / when daemonising

Posted by "Nikola Petrov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493263#comment-13493263 ] 

Nikola Petrov commented on DAEMON-264:
--------------------------------------

Hi

Please if you change this in the next release by default, consider adding an option to specify the current working directory. We are currently using jsvc for our java processes and they make some assumptions about the current directory structure(for example configs file are taken from relative paths). This is currently easy to fix by cd to the right directory but it won't be if you change it by default.

Best, Nikola
                
> Change current working directory to / when daemonising
> ------------------------------------------------------
>
>                 Key: DAEMON-264
>                 URL: https://issues.apache.org/jira/browse/DAEMON-264
>             Project: Commons Daemon
>          Issue Type: Improvement
>          Components: Jsvc
>    Affects Versions: 1.0.10
>         Environment: Linux
>            Reporter: David North
>            Priority: Minor
>
> It's good practice for daemons to change their current working directory to / as this ensures they don't prevent file systems being mounted/unmounted by having a cwd wherever their controlling terminal was when it spawned them.
> It would be great if jsvc could chdir to / when detatching from its controlling terminal.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira