At 21:36 -0700 5/22/06, Walter Ian Kaye wrote: >So, which part actually makes the script "stay open"?
The script keeps running because it terminates itself only when it gets an "exit" command over the socket. The last loop is effectively infinite depending on the kernel to block execution while awaiting data on the socket. Actually a real daemon would respond to an initial request by forking a copy of itself which would handle a particular client until the client quits. That way the original stays around forever. >Do you launch it with a "&" to put it in the background? That would be a way to allow a logged-in user to do other things while it runs but it wasn't important to the testing. While I was fussing with BBEdit on OS neXt I didn't really care if my login to Linux allowed operator action. In a final solution the daemon would be launched as root by a boot script. >And why are there examples of daemons on the Web which look nothing at all >like the webreference tutorial example? I mean, one page says "you need lines >A and B" while another page says you need "C and D" and does not use A and B >at all? <http://perldoc.perl.org/perlipc.html#Interactive-Client-with-IO%3a%3aSocket> >See why I'm confused. :-) Yep. But try un-confusing AppleScript. Or try making a BBEdit worksheet talk to a named pipe for its shell. -- --> The Intelligent Designer managed to create the only species that kills its own members while claiming that it acts in accordance with God's word. <-- -- ------------------------------------------------------------------ Have a feature request? Not sure the software's working correctly? If so, please send mail to <[EMAIL PROTECTED]>, not to the list. List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml> List archives: <http://www.listsearch.com/BBEditTalk.lasso> To unsubscribe, send mail to: <[EMAIL PROTECTED]>
