Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Creating Servers in Rebol on Linux Re:(2)

From: christmn::clackamas::ds::adp::com at: 28-Aug-2000 17:07

This is a multi-part message in MIME format. ------=_NextPart_000_061F_01C01112.747A0090 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable You may have to put it in a shell wrapper using nohup and putting it in background. The telnet session sends a HUP signal on disconnect and this is killing your server. You can also put the shell script in the boot startup directory with start/stop args then write your cgi to execute the script with a stop or start directive. ----- Original Message ----- From: [kevin--sunshinecable--com] To: [list--rebol--com] Sent: Monday, August 28, 2000 4:13 PM Subject: [REBOL] Creating Servers in Rebol on Linux Re:
> How do I make the thing run resident so I can start or stop it via remote cgi? > > Right now, I must telnet in and run manually, if I close telnet client, > server shuts down.
When you start your script, you should detach it from the console so that when you log out the process continues running: The following runs a REBOL script in the background (&) and redirects stdout and stderr to the null device (1> /dev/null 2> /dev/null) so no output remains directed at the console. %./fakenews.r & 1> /dev/null 2> /dev/null Try that and see if it solves your problem. Best regards, Kev ------------------------------------------------------------------------ Kevin McKinnon, System/Network Administrator [kevin--sunshinecable--com] Sunshine Communications http://www.sunshinecable.com PGP Public Key: http://www.dockmaster.net/pgp.html PGP 6.0 www.pgp.com ------=_NextPart_000_061F_01C01112.747A0090 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4134.600" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT size=2>You may have to put it in a shell wrapper using nohup and putting it in background. The telnet session sends a HUP signal on disconnect and this is killing your server. You can also put the shell script in the boot startup directory with start/stop args then write your cgi to execute the script with a stop or start directive.</FONT></DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=[kevin--sunshinecable--com] href="mailto:[kevin--sunshinecable--com]">[kevin--sunshinecable--com]</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=[list--rebol--com] href="mailto:[list--rebol--com]">[list--rebol--com]</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, August 28, 2000 4:13 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> [REBOL] Creating Servers in Rebol on Linux Re:</DIV> <DIV><BR></DIV>> How do I make the thing run resident so I can start or stop it via remote cgi?<BR>> <BR>> Right now, I must telnet in and run manually, if I close telnet client, <BR>> server shuts down.<BR><BR>When you start your script, you should detach it from the console so <BR>that when you log out the process continues running:<BR><BR>The following runs a REBOL script in the background (&amp;) and redirects <BR>stdout and stderr to the null device (1> /dev/null 2> /dev/null) so <BR>no output remains directed at the console.<BR><BR>%./fakenews.r &amp; 1> /dev/null 2> /dev/null<BR><BR>Try that and see if it solves your problem.<BR><BR>Best regards,<BR>Kev<BR><BR>------------------------------------------------------------------------<BR>Kevin McKinnon, System/Network Administrator&nbsp;&nbsp;&nbsp;&nbsp; <A href="mailto:[kevin--sunshinecable--com]">[kevin--sunshinecable--com]</A><BR>Sunshine Communications&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="http://www.sunshinecable.com">http://www.sunshinecable.com</A><BR
><BR>PGP
Public Key: <A href="http://www.dockmaster.net/pgp.html">http://www.dockmaster.net/pgp.html</A>&nbsp;&nbsp; PGP 6.0 <A href="http://www.pgp.com">www.pgp.com</A><BR><BR></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_061F_01C01112.747A0090--