[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Packaging questions



I'm packaging the Tcl-based HTTP server written by Brent Welch 
(Scriptics, Inc.) and Stephen Uhler (Sun Microsystems). The server 
itself is running fine, but there are a few issues that I'd like to ask 
about regarding its integration into the Debian system.

1. Usually a daemon makes itself into a child of `init' by forking twice
   and letting itself be adopted. The Tcl server doesn't do this (it can
   offer a command prompt and/or Tk-based GUI so one can debug it or
   include patches, and Tcl doesn't have `fork' anyway). I have an init
   script that starts the server by interposing a shell script, but this
   makes it difficult to stop the server using `start-stop-daemon', 
   since `start-stop-daemon' doesn't seem to find the correct process to
   kill.

   There are different options:

   - Use hand-written code instead of `start-stop-daemon' to start and
     stop the server. This is probably the most workable approach.

   - Write a C wrapper that handles the daemonization. This is a 
     nuisance because the server itself is architecture-independent (it
     is a pure Tcl program).

   - Change the server so it daemonizes itself properly. This would
     probably be a major undertaking.

   Any ideas?

2. The server includes a few Tcl extensions in C that offer interfaces
   to library functions such as crypt() and [gs]etrlimit(). These come
   in a separate package, which is `Recommend:'ed by the main server
   package, since the server works perfectly well without them (although
   with some loss of functionality). If you install the package while
   the server is running (e.g., because it was started from the init
   script when the server had been installed earlier), the server needs
   to be started and stopped to take advantage of the new extensions.
   Should I

   - output a note to that effect in the post-install script of the
     extensions package

   - include code to start and stop the server in the extensions package
     (I happen to think that this would be uncalled-for meddling with
     the affairs of the server)

   - do anything else?

I'd be happy to hear from you if you have any suggestions.

Anselm
-- 
Anselm Lingnau ......................... lingnau@tm.informatik.uni-frankfurt.de
No man but a blockhead ever wrote except for money.
                                               -- Samuel Johnson, after Boswell


Reply to: