Your message dated Tue, 04 Sep 2007 19:47:03 +0000 with message-id <[EMAIL PROTECTED]> and subject line Bug#440818: fixed in expect 5.43.0-13 has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database)
--- Begin Message ---Package: expect Version: 5.43.0-8 In exp_command.c expBusy is called from exp_close to ensure that an ExpState is connected to /dev/null rather than having simply invalid fd's. However, the code forgets that an ExpState has both input and output fds. It connects the input fd to /dev/null but neglects the input fd. Under some circumstances, this means that expect closes its fds 0 and 1 but only reopens /dev/null for fd 0. expect then continues without fd 1 and things start to go wrong. Additionally, expBusy forgets that not all fds should be marked close on exec: fds 0-2 should not, because called programs will need them. The attached patch remedies these problems. I note while perusing the code that the error handling is atrocious. Many system calls lack error checking. I have retained this style in expBusy to reduce the size of the patch and to avoid having to take on the herculean task of adding an error check to every syscall in expect. Regards, Ian. diff -rU10 orig/expect-5.43.0/exp_command.c expect-5.43.0/exp_command.c --- orig/expect-5.43.0/exp_command.c 2004-08-20 18:18:01.000000000 +0100 +++ expect-5.43.0/exp_command.c 2007-09-04 12:35:06.000000000 +0100 @@ -303,21 +303,29 @@ static void expBusy(esPtr) ExpState *esPtr; { int x = open("/dev/null",0); if (x != esPtr->fdin) { fcntl(x,F_DUPFD,esPtr->fdin); close(x); } - expCloseOnExec(esPtr->fdin); + if (esPtr->fdout != EXP_NOFD && + esPtr->fdout != esPtr->fdin) { + fcntl(esPtr->fdin,F_DUPFD,esPtr->fdout); + } + if (esPtr->fdin > 2) + expCloseOnExec(esPtr->fdin); + if (esPtr->fdout != EXP_NOFD && + esPtr->fdout > 2) + expCloseOnExec(esPtr->fdout); esPtr->fdBusy = TRUE; } int exp_close(interp,esPtr) Tcl_Interp *interp; ExpState *esPtr; { if (0 == expStateCheck(interp,esPtr,1,0,"close")) return TCL_ERROR; esPtr->open = FALSE;
--- End Message ---
--- Begin Message ---Source: expect Source-Version: 5.43.0-13 We believe that the bug you reported is fixed in the latest version of expect, which is due to be installed in the Debian FTP archive: expect-dev_5.43.0-13_i386.deb to pool/main/e/expect/expect-dev_5.43.0-13_i386.deb expect_5.43.0-13.diff.gz to pool/main/e/expect/expect_5.43.0-13.diff.gz expect_5.43.0-13.dsc to pool/main/e/expect/expect_5.43.0-13.dsc expect_5.43.0-13_i386.deb to pool/main/e/expect/expect_5.43.0-13_i386.deb expectk_5.43.0-13_i386.deb to pool/main/e/expect/expectk_5.43.0-13_i386.deb A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [EMAIL PROTECTED], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Daniel Baumann <[EMAIL PROTECTED]> (supplier of updated expect package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [EMAIL PROTECTED]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.7 Date: Tue, 4 Sep 2007 21:34:00 +0200 Source: expect Binary: expect expectk expect-dev Architecture: source i386 Version: 5.43.0-13 Distribution: unstable Urgency: low Maintainer: Daniel Baumann <[EMAIL PROTECTED]> Changed-By: Daniel Baumann <[EMAIL PROTECTED]> Description: expect - A program that can automate interactive applications expect-dev - A program that can automate interactive applications (development expectk - A program that can automate interactive applications (Tk hooks) Closes: 440818 Changes: expect (5.43.0-13) unstable; urgency=low . * Applied patch from Ian Jackson <[EMAIL PROTECTED]> to add fdout in expBusy (Closes: #440818). Files: 5d11c182322026252a1319a7c39dcc0d 641 interpreters optional expect_5.43.0-13.dsc 4fd9fed5f50bde2578f262824d933d03 40308 interpreters optional expect_5.43.0-13.diff.gz 23f2b3c2fbe3e30a77e3bb75a8fa6520 315220 interpreters optional expect_5.43.0-13_i386.deb 73d3e6c6a818dce157d7077419a51996 90276 interpreters optional expectk_5.43.0-13_i386.deb 97665fa2890d304d3f48243f760f617f 277040 interpreters optional expect-dev_5.43.0-13_i386.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG3bQA+C5cwEsrK54RArsDAJ4gfGDhzjw09HCTR0jWX7/5YWPjtwCfYM9O mdiFGEYG8C6UQgjhvK5HnnI= =qwnG -----END PGP SIGNATURE-----
--- End Message ---

