RE: commons-sandbox/daemon
Howdy, >1) I want to call setsid (on platforms that support it) after the detach, >since evil things happen if I don't (at least on RH Linux). Good idea, >2) I want to add a -outfile and -errfile to the config options (consistant >with procrun, and both defaulting to /dev/null). stdin will get redirected >to /dev/null, and stdout & stderr will get redirected to the values of the >variables. If I can get it to work, I'd also like to add the special >values >"&1" and "&2" to simulate "2>&1". As it stands now, manually stopping and >starting Tomcat with jsvc hangs my ssh session on logout, since it still >has >open files to the pty. Also good idea, as long as &1 and &2 are well-documented, as those are not standard unix. >3) Modify Tomcat.sh to reflect the changes in 2) (e.g. add: >-outfile $CATALINA_HOME/logs/catalina.out \ >-errfile &1 \ >). Cool. +1. I also agree with keeping daemon in the commons and possibly promoting it out of the sandbox into commons-proper. I think the functionality it offers is generic beyond tomcat, and I for one plan to use it for things other than tomcat. ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: commons-sandbox/daemon
Bill Barker wrote: - Original Message - From: "jean-frederic clere" <[EMAIL PROTECTED]> To: "Tomcat Developers List" <[EMAIL PROTECTED]> Sent: Friday, June 20, 2003 12:21 AM Subject: Re: commons-sandbox/daemon Bill Barker wrote: Ok, yes I know that this should go to commons-dev, but I don't monitor that list as closely and all of the active developers hang-out here. I would like to make some changes to native/unix/native, and (keeping with commons conventions) should ask first. I already have commons-sandbox karma, so that's not an issue. 1) I want to call setsid (on platforms that support it) after the detach, since evil things happen if I don't (at least on RH Linux). -1 : The idea is to be root until we call the start. (See child). Tell what goes wrong we should fix it. I don't understand. setsid doesn't change the identity, it just puts the (forked) process into a new session, and divorces it from the pty. The process is still running as "root". It's similar to (or, rather, a subset of) the Linux "daemon" API call. Since it is good enough for Apache/httpd, I really didn't expect any controversy on this one. Oops I was a bit to fast in my answer and have though of a setuid(). Of course the setsid() is _missing_ in the actual daemon code. So you have my +1, sorry for the bad comment. The problem is that the monitor still gets signals from my terminal session (including HUP when I try to logout). Similar to below, it hangs my ssh session, since there is still an active proc in the same session as mine when I try to logout. 2) I want to add a -outfile and -errfile to the config options (consistant with procrun, and both defaulting to /dev/null). stdin will get redirected to /dev/null, and stdout & stderr will get redirected to the values of the variables. If I can get it to work, I'd also like to add the special values "&1" and "&2" to simulate "2>&1". As it stands now, manually stopping and starting Tomcat with jsvc hangs my ssh session on logout, since it still has open files to the pty. +1 3) Modify Tomcat.sh to reflect the changes in 2) (e.g. add: -outfile $CATALINA_HOME/logs/catalina.out \ -errfile &1 \ ). +1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: commons-sandbox/daemon
- Original Message - From: "jean-frederic clere" <[EMAIL PROTECTED]> To: "Tomcat Developers List" <[EMAIL PROTECTED]> Sent: Friday, June 20, 2003 12:21 AM Subject: Re: commons-sandbox/daemon > Bill Barker wrote: > > Ok, yes I know that this should go to commons-dev, but I don't monitor that > > list as closely and all of the active developers hang-out here. > > > > I would like to make some changes to native/unix/native, and (keeping with > > commons conventions) should ask first. I already have commons-sandbox > > karma, so that's not an issue. > > > > 1) I want to call setsid (on platforms that support it) after the detach, > > since evil things happen if I don't (at least on RH Linux). > > -1 : The idea is to be root until we call the start. (See child). > Tell what goes wrong we should fix it. I don't understand. setsid doesn't change the identity, it just puts the (forked) process into a new session, and divorces it from the pty. The process is still running as "root". It's similar to (or, rather, a subset of) the Linux "daemon" API call. Since it is good enough for Apache/httpd, I really didn't expect any controversy on this one. The problem is that the monitor still gets signals from my terminal session (including HUP when I try to logout). Similar to below, it hangs my ssh session, since there is still an active proc in the same session as mine when I try to logout. > > > 2) I want to add a -outfile and -errfile to the config options (consistant > > with procrun, and both defaulting to /dev/null). stdin will get redirected > > to /dev/null, and stdout & stderr will get redirected to the values of the > > variables. If I can get it to work, I'd also like to add the special values > > "&1" and "&2" to simulate "2>&1". As it stands now, manually stopping and > > starting Tomcat with jsvc hangs my ssh session on logout, since it still has > > open files to the pty. > > +1 > > > 3) Modify Tomcat.sh to reflect the changes in 2) (e.g. add: > > -outfile $CATALINA_HOME/logs/catalina.out \ > > -errfile &1 \ > > ). > > +1 > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: commons-sandbox/daemon
Costin Manolache wrote: Bill Barker wrote: Ok, yes I know that this should go to commons-dev, but I don't monitor that list as closely and all of the active developers hang-out here. I would like to make some changes to native/unix/native, and (keeping with commons conventions) should ask first. I already have commons-sandbox karma, so that's not an issue. 1) I want to call setsid (on platforms that support it) after the detach, since evil things happen if I don't (at least on RH Linux). 2) I want to add a -outfile and -errfile to the config options (consistant with procrun, and both defaulting to /dev/null). stdin will get redirected to /dev/null, and stdout & stderr will get redirected to the values of the variables. If I can get it to work, I'd also like to add the special values "&1" and "&2" to simulate "2>&1". As it stands now, manually stopping and starting Tomcat with jsvc hangs my ssh session on logout, since it still has open files to the pty. 3) Modify Tomcat.sh to reflect the changes in 2) (e.g. add: -outfile $CATALINA_HOME/logs/catalina.out \ -errfile &1 \ ). +1 I know this has been discussed several times - but wouldn't be time to move the daemon back to tomcat ? I have already explain why I am against this idea. I would like to see daemon promoted to common-daemon. For the moment I am trying to fix the stop of procrun in win9x. BTW: I have added reflexion and now daemon could be used to start Tomcat5. and would like to see daemon promote to common-daemon. Maybe we made a mistake by trying to move it to commons, it doesn't seem to gain a lot of developers or users outside tomcat. Costin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: commons-sandbox/daemon
Bill Barker wrote: Ok, yes I know that this should go to commons-dev, but I don't monitor that list as closely and all of the active developers hang-out here. I would like to make some changes to native/unix/native, and (keeping with commons conventions) should ask first. I already have commons-sandbox karma, so that's not an issue. 1) I want to call setsid (on platforms that support it) after the detach, since evil things happen if I don't (at least on RH Linux). -1 : The idea is to be root until we call the start. (See child). Tell what goes wrong we should fix it. 2) I want to add a -outfile and -errfile to the config options (consistant with procrun, and both defaulting to /dev/null). stdin will get redirected to /dev/null, and stdout & stderr will get redirected to the values of the variables. If I can get it to work, I'd also like to add the special values "&1" and "&2" to simulate "2>&1". As it stands now, manually stopping and starting Tomcat with jsvc hangs my ssh session on logout, since it still has open files to the pty. +1 3) Modify Tomcat.sh to reflect the changes in 2) (e.g. add: -outfile $CATALINA_HOME/logs/catalina.out \ -errfile &1 \ ). +1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: commons-sandbox/daemon
Bill Barker wrote: > Ok, yes I know that this should go to commons-dev, but I don't monitor > that list as closely and all of the active developers hang-out here. > > I would like to make some changes to native/unix/native, and (keeping with > commons conventions) should ask first. I already have commons-sandbox > karma, so that's not an issue. > > 1) I want to call setsid (on platforms that support it) after the detach, > since evil things happen if I don't (at least on RH Linux). > 2) I want to add a -outfile and -errfile to the config options (consistant > with procrun, and both defaulting to /dev/null). stdin will get > redirected to /dev/null, and stdout & stderr will get redirected to the > values of the > variables. If I can get it to work, I'd also like to add the special > values > "&1" and "&2" to simulate "2>&1". As it stands now, manually stopping and > starting Tomcat with jsvc hangs my ssh session on logout, since it still > has open files to the pty. > 3) Modify Tomcat.sh to reflect the changes in 2) (e.g. add: > -outfile $CATALINA_HOME/logs/catalina.out \ > -errfile &1 \ > ). +1 I know this has been discussed several times - but wouldn't be time to move the daemon back to tomcat ? Maybe we made a mistake by trying to move it to commons, it doesn't seem to gain a lot of developers or users outside tomcat. Costin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
commons-sandbox/daemon
Ok, yes I know that this should go to commons-dev, but I don't monitor that list as closely and all of the active developers hang-out here. I would like to make some changes to native/unix/native, and (keeping with commons conventions) should ask first. I already have commons-sandbox karma, so that's not an issue. 1) I want to call setsid (on platforms that support it) after the detach, since evil things happen if I don't (at least on RH Linux). 2) I want to add a -outfile and -errfile to the config options (consistant with procrun, and both defaulting to /dev/null). stdin will get redirected to /dev/null, and stdout & stderr will get redirected to the values of the variables. If I can get it to work, I'd also like to add the special values "&1" and "&2" to simulate "2>&1". As it stands now, manually stopping and starting Tomcat with jsvc hangs my ssh session on logout, since it still has open files to the pty. 3) Modify Tomcat.sh to reflect the changes in 2) (e.g. add: -outfile $CATALINA_HOME/logs/catalina.out \ -errfile &1 \ ). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]