On Sat, Jul 02, 2005 at 02:33:02PM +0200, Markus Schulz wrote: > Am Mittwoch, 29. Juni 2005 19:28 schrieb Tilman Koschnick: > > On Wed, 2005-06-29 at 14:36 +0200, Markus Schulz wrote: > > > Unpacking replacement antzsystem-dispatcher ... > > > Setting up antzsystem-dispatcher (2.1) ... > > > Starting dispatcher: ++: 2005-06-29 14:24:36 (19338:B7D1CA40) > > > dispatcher.cpp:296: Daemonize now... > > > Daemonize with logfile=/var/log/antzsystem/dispatcher.log and > > > pidfile=/var/run/antzsystem/dispatcher.pid > > > Now running all modules from /etc/antzsystem/init.d > > > <And now it hangs> > > > **************************** > > > the child process of /usr/share/debconf/frontend then becomes a > > > zombie. i don't understand why the install hangs after running the > > > postinst script (which runs fine and exit with 0) from the package > > > and use invoke-rc.d script which successfully starts the binary > > > (which daemonize himself). The program works successfully after > > > this, but the install process hangs. > > > > This snippet is taken from the end of another postinst script that > > starts a daemon, maybe it applies to your case as well: > > > > ------8<------ > > # tell debconf we are done. otherwise, it hangs waiting for the > > daemon. db_stop; > > > > exit 0 > > ------8<------ > > > > thanks, this works fine. > perhaps this could be applied automaticly if debhelper(dh_installinit) > postinst script generates invoke-rc.d code snippet? This might be a reasonable idea; submit a wishlist bug on debhelper. One problem might be that db_stop could cause problems if called multiple times. Then, people's custom-written postinst scripts, which already call db_stop (somewhere in the middle of a conditional, or a function up top, which is called conditionally). Of course, we can't go breaking everybody's packages (well, maybe debhelper 5 can:)
Other flow control in the postinst further confuses this issue; if someone has an "exit 0", then the db_stop at the end won't help. Its at least worth an automated comment at the bottom. Justin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]