Report forwarded to debian-bugs-dist@lists.debian.org, Erick Branderhorst <branderh@debian.org>:
Bug#12411; Package glibcdoc.   debian-bugs-dist@lists.debian.orgErick Branderhorst  Subject: Bug#12411: example directory lister ignores errors Reply-To: Ian Jackson , 12411@bugs.debian.org Resent-From: Ian Jackson Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Erick Branderhorst Resent-Date: Sun, 31 Aug 1997 15:33:02 GMT Resent-Message-ID: Resent-Sender: iwj@debian.org X-Debian-PR-Message: report 12411 X-Debian-PR-Package: glibcdoc X-Debian-PR-Keywords: X-Loop: owner@bugs.debian.org Received: via spool by bugs@bugs.debian.org id=B.87304094924707 (code B ref -1); Sun, 31 Aug 1997 15:33:02 GMT From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Debian bugs submission address X-Mailer: VM 6.28 under Emacs 19.34.1 Message-Id: Date: Sun, 31 Aug 1997 16:11:30 +0100 Package: glibcdoc Version: 1.92-1 The example directory lister in (libc)Simple Directory Lister is a very poor example, because: * it does not check the return values from closedir or puts; * it does not fflush stdout (so that errors writing stdout will not be detected unless they happen more than one stdio buffer length from the end of the output data); * it prints the error message about failing to open the directory to stdout instead of stderr; * when the opendir fails it doesn't print the value of errno. Some people might say `hey, it's only an example, it doesn't matter if it's crap'. However, programmers using this example when writing their own code will probably replicate many of these mistakes, producing programs with unreliable and unhelpful error behaviours. I suppose we can forgive it for ignoring its arguments, rather than checking that it has none. Ian.   Acknowledgement sent to Ian Jackson <ian@davenant.greenend.org.uk>:
New bug report received and forwarded. Copy sent to Erick Branderhorst <branderh@debian.org>.   -t  From: owner@bugs.debian.org (Ian Jackson) To: Ian Jackson Subject: Bug#12411: Acknowledgement (was: example directory lister ignores errors) Message-ID: In-Reply-To: References: X-Debian-PR-Message: ack 12411 Thank you for the problem report you have sent regarding Debian Linux. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers' mailing list for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): Erick Branderhorst If you wish to submit further information on your problem, please send it to 12411@bugs.debian.org (and *not* to bugs@bugs.debian.org). Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, Debian bug tracking system)   Received: (at submit) by bugs.debian.org; 31 Aug 1997 15:22:29 +0000 Received: (qmail 24704 invoked from network); 31 Aug 1997 15:22:28 -0000 Received: from chiark.greenend.org.uk (root@chiark.greenend.org.uk@194.217.216.25) by 205.229.104.5 with SMTP; 31 Aug 1997 15:22:28 -0000 Received: by chiark.greenend.org.uk id m0x5BgU-0004nxC (Debian /\oo/\ Smail3.1.29.1 #29.37); Sun, 31 Aug 97 16:13 BST Received: from ian by davenant.greenend.org.uk with local (Exim 1.61 #1) id 0x5Bf0-0005ma-00 (Debian); Sun, 31 Aug 1997 16:11:30 +0100 From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Debian bugs submission address Subject: example directory lister ignores errors X-Mailer: VM 6.28 under Emacs 19.34.1 Message-Id: Date: Sun, 31 Aug 1997 16:11:30 +0100 Package: glibcdoc Version: 1.92-1 The example directory lister in (libc)Simple Directory Lister is a very poor example, because: * it does not check the return values from closedir or puts; * it does not fflush stdout (so that errors writing stdout will not be detected unless they happen more than one stdio buffer length from the end of the output data); * it prints the error message about failing to open the directory to stdout instead of stderr; * when the opendir fails it doesn't print the value of errno. Some people might say `hey, it's only an example, it doesn't matter if it's crap'. However, programmers using this example when writing their own code will probably replicate many of these mistakes, producing programs with unreliable and unhelpful error behaviours. I suppose we can forgive it for ignoring its arguments, rather than checking that it has none. Ian.   Information forwarded to debian-bugs-dist@lists.debian.org, Erick Branderhorst <branderh@debian.org>:
Bug#12411; Package glibcdoc.   debian-bugs-dist@lists.debian.orgErick Branderhorst  Subject: Bug#12411: example directory lister ignores errors Reply-To: Vincent Renardias , 12411@bugs.debian.org Resent-From: Vincent Renardias Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Erick Branderhorst Resent-Date: Sun, 31 Aug 1997 17:33:00 GMT Resent-Message-ID: Resent-Sender: iwj@debian.org X-Debian-PR-Message: report 12411 X-Debian-PR-Package: glibcdoc X-Debian-PR-Keywords: X-Loop: owner@bugs.debian.org Received: via spool by 12411-bugs@bugs.debian.org id=B12411.87304837011854 (code B ref 12411); Sun, 31 Aug 1997 17:33:00 GMT Date: Sun, 31 Aug 1997 19:30:27 +0100 (GMT+0100) From: Vincent Renardias To: Ian Jackson , 12411@bugs.debian.org cc: libc6-doc@packages.debian.org In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 31 Aug 1997, Ian Jackson wrote: > Package: glibcdoc > Version: 1.92-1 This package has been superceded by libc6-doc, and should be removed from hamm (if not already done). However the libc6 maintainer should check if this bug is still in libc6-doc or not. Cordialement, -- - ** Linux ** +-------------------+ ** WAW ** - - vincent@debian.org | RENARDIAS Vincent | vincent@waw.com - - Debian/GNU Linux +-------------------+ http://www.waw.com/ - - http://www.debian.org/ | WAW (33) 4 91 81 21 45 - ---------------------------------------------------------------------------   Acknowledgement sent to Vincent Renardias <vincent@waw.com>:
Extra info received and forwarded to list. Copy sent to Erick Branderhorst <branderh@debian.org>.   -t  From: owner@bugs.debian.org (Ian Jackson) To: Vincent Renardias Subject: Bug#12411: Info received (was Bug#12411: example directory lister ignores errors) Message-ID: In-Reply-To: References: X-Debian-PR-Message: ack-info-maintonly 12411 Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) and to the developers' mailing list to accompany the original report. Your message has been sent to the package maintainer(s): Erick Branderhorst If you wish to continue to submit further information on your problem, please send it to 12411@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, Debian bug tracking system)   Received: (at 12411) by bugs.debian.org; 31 Aug 1997 17:26:10 +0000 Received: (qmail 11845 invoked from network); 31 Aug 1997 17:26:07 -0000 Received: from ns1.waw.com (HELO odin.waw.com) (root@ns1.waw.com@194.51.88.250) by 205.229.104.5 with SMTP; 31 Aug 1997 17:26:07 -0000 Received: from odin.waw.com (vincent@mail.waw.com [194.51.88.252]) by odin.waw.com (8.7.3/8.7.3/waw) with SMTP id TAA12670; Sun, 31 Aug 1997 19:30:27 +0100 Date: Sun, 31 Aug 1997 19:30:27 +0100 (GMT+0100) From: Vincent Renardias To: Ian Jackson , 12411@bugs.debian.org cc: libc6-doc@packages.debian.org Subject: Re: Bug#12411: example directory lister ignores errors In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 31 Aug 1997, Ian Jackson wrote: > Package: glibcdoc > Version: 1.92-1 This package has been superceded by libc6-doc, and should be removed from hamm (if not already done). However the libc6 maintainer should check if this bug is still in libc6-doc or not. Cordialement, -- - ** Linux ** +-------------------+ ** WAW ** - - vincent@debian.org | RENARDIAS Vincent | vincent@waw.com - - Debian/GNU Linux +-------------------+ http://www.waw.com/ - - http://www.debian.org/ | WAW (33) 4 91 81 21 45 - ---------------------------------------------------------------------------   Bug reassigned from package `glibcdoc' to `libc6-doc'. Request was from jdassen@wi.leidenuniv.nl (J.H.M.Dassen) to control@bugs.debian.org.   Received: (at control) by bugs.debian.org; 14 Oct 1997 08:31:55 +0000 Received: (qmail 11173 invoked from network); 14 Oct 1997 08:31:52 -0000 Received: from zeus.wi.leidenuniv.nl (HELO mailhost.wi.leidenuniv.nl) (root@zeus.wi.leidenuniv.nl@132.229.128.1) by 205.229.104.5 with SMTP; 14 Oct 1997 08:31:52 -0000 Received: from ind206ab.wi.leidenuniv.nl (jdassen@ind206ab [132.229.128.223]) by mailhost.wi.leidenuniv.nl (8.6.10a/SBH-1.20.1-M) with ESMTP id JAA25171 for ; Tue, 14 Oct 1997 09:33:25 +0100 (MET) From: jdassen@wi.leidenuniv.nl (J.H.M.Dassen) Organization: Leiden University, Dept. of Mathematics & Computer Science, The Netherlands Received: from (jdassen@localhost) by ind206ab.wi.leidenuniv.nl (8.6.9/FHM-1.03-S) id IAA04282 for control@bugs.debian.org; Tue, 14 Oct 1997 08:33:24 GMT (MET) Message-Id: <199710140833.IAA04282@ind206ab.wi.leidenuniv.nl> To: control@bugs.debian.org Date: Tue, 14 Oct 1997 09:33:24 +0100 (MET) Return-Receipt-To: jdassen@wi.leidenuniv.nl X-home-page: X-No-Junk-Mail: I do not want to get *any* junk mail. Do not add me to any mailing lists without my express request. X-PGP: finger jdassen@{artemis,hermes,ploutos}.wi.LeidenUniv.nl for PGP key X-Mailer: ELM [version 2.4 PL24 PGP6] Content-Type: text Content-Length: 157 merge 13464 13614 13860 severity 13464 grave reassign 2906 libc6-doc reassign 9888 libc6-doc reassign 12411 libc6-doc thanks -- Obsig: developing a new sig   Bug reassigned from package `libc6-doc' to `glibc-doc'. Request was from "J.H.M. Dassen" <jdassen@wi.leidenuniv.nl> to control@bugs.debian.org.   Received: (at control) by bugs.debian.org; 12 Mar 1999 10:13:12 +0000 Received: (qmail 1730 invoked from network); 12 Mar 1999 10:13:11 -0000 Received: from zeus.wi.leidenuniv.nl (132.229.128.1) by master.debian.org with SMTP; 12 Mar 1999 10:13:11 -0000 Received: from ultra5.wi.leidenuniv.nl (ultra5 [132.229.128.75]) by zeus.wi.leidenuniv.nl (8.8.8/8.8.8/WI) with ESMTP id LAA07389 for ; Fri, 12 Mar 1999 11:13:08 +0100 (MET) Received: (from jdassen@localhost) by ultra5.wi.leidenuniv.nl (sendmail 8.6.10a/VZ-1.1) id LAA09324 for control@bugs.debian.org; Fri, 12 Mar 1999 11:13:06 +0100 Date: Fri, 12 Mar 1999 11:13:06 +0100 From: "J.H.M. Dassen" To: control@bugs.debian.org Subject: Maintainer unknown Message-ID: <19990312111306.A9270@ultra5.wi.leidenuniv.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i reassign 9888 glibc-doc reassign 11839 glibc-doc reassign 12411 glibc-doc reassign 13163 glibc-doc reassign 13217 glibc-doc reassign 14590 glibc-doc reassign 17874 glibc-doc reassign 19072 glibc-doc reassign 20973 glibc-doc reassign 25426 glibc-doc reassign 26105 glibc-doc reassign 26514 glibc-doc reassign 27201 glibc-doc reassign 27586 glibc-doc reassign 29399 glibc-doc reassign 32345 glibc-doc reassign 25603 glibc-doc # reassign 10068 slang1 reassign 25460 # reassign 10450 libc5-altdev reassign 13941 libc5-altdev reassign 20965 libc5-altdev # reassign 21069 libstdc++2.9-dev reassign 25504 libstdc++2.9-dev reassign 26262 libstdc++2.9-dev reassign 26809 libstdc++2.9-dev # reassign 34227 lyx reassign 34228 lyx reassign 34233 debian-policy reassign 34258 general reassign 34246 bind reassign 34325 chrony reassign 34331 general reassign 34343 apt reassign 34311 general reassign 20247 libstdc++2.9-dev reassign 21153 libstdc++2.9-dev reassign 10650 doc-linux-text thanks Wow. We sure had a release: 60+ new "maintainer unknown" bug reports. I've reassigned them to what looks to me as the closest relative package in slink. Ray -- PATRIOTISM A great British writer once said that if he had to choose between betraying his country and betraying a friend he hoped he would have the decency to betray his country. - The Hipcrime Vocab by Chad C. Mulligan   Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson <ian@davenant.greenend.org.uk>, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org:
Bug#12411; Package glibc-doc.   debian-bugs-dist@lists.debian.orgIan Jackson GNU Libc Maintainers glibc@packages.qa.debian.org  X-Loop: owner@bugs.debian.org Subject: Bug#12411: [PATCH] A better Directory Lister example Reply-To: "H. S. Teoh" , 12411@bugs.debian.org Resent-From: "H. S. Teoh" Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Ian Jackson , GNU Libc Maintainers , glibc@packages.qa.debian.org Resent-Date: Fri, 27 Dec 2002 03:18:02 GMT Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: report 12411 X-Debian-PR-Package: glibc-doc X-Debian-PR-Keywords: Received: via spool by 12411-submit@bugs.debian.org id=B12411.104095875616177 (code B ref 12411); Fri, 27 Dec 2002 03:18:02 GMT Date: Thu, 26 Dec 2002 22:15:52 -0500 To: 12411@bugs.debian.org, control@bugs.debian.org Message-ID: <20021227031551.GA21364@crystal> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.4i From: "H. S. Teoh" Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-5.8 required=5.0 tests=PATCH_UNIFIED_DIFF,QUOTED_EMAIL_TEXT,SEARCH_ENGINE_PROMO, SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MUTT version=2.41 X-Spam-Level: --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tags 12411 + patch thanks Hi, attached is a patch that gives a better Directory Lister example. Ian's concerns are addressed as follows: > * it does not check the return values from closedir or puts; Now it does. > * it does not fflush stdout (so that errors writing stdout will not be > detected unless they happen more than one stdio buffer length from > the end of the output data); I have declined to address this, since this example is mainly concerned with using the libc directory reading functions, not with handling stdout errors. > * it prints the error message about failing to open the directory to > stdout instead of stderr; The current version of the info file uses perror(), which, as far as I know, print to stderr, not stdout. > * when the opendir fails it doesn't print the value of errno. I believe using perror() gives a sufficient representation of the value of errno. > Some people might say `hey, it's only an example, it doesn't matter if > it's crap'. However, programmers using this example when writing > their own code will probably replicate many of these mistakes, > producing programs with unreliable and unhelpful error behaviours. I agree, except that an example starts to lose its effectiveness to convey its intended message if real-life issues start to intrude upon it beyond what is necessary. Using fflush on stdout is one point that IMHO is beyond the scope of this example, although I do agree on the other points (to emphasize that one should always check the return code of syscalls and library calls, etc). > I suppose we can forgive it for ignoring its arguments, rather than > checking that it has none. I'm tempted to also address this in my proposed fix to the example, but as I said, this is getting near the point where it starts detracting from the point of the example. I personally regard it as extremely bad practice to declare main() as main(void); nevertheless, the stated purpose of this example is that it lists files in the current directory, and as such, it seems superfluous to declare and check for argc and argv. The official glibc maintainers can, of course, add this additional check to the example should they so choose. T -- LINUX = Lousy Interface for Nefarious Unix Xenophobes. --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="12411.patch" --- libc.info-24.ORIG 2002-12-26 21:47:28.000000000 -0500 +++ libc.info-24 2002-12-26 21:54:23.000000000 -0500 @@ -498,8 +498,17 @@ if (dp != NULL) { while (ep = readdir (dp)) - puts (ep->d_name); - (void) closedir (dp); + { + if (puts (ep->d_name) == EOF) + { + perror ("Unable to write to stdout"); + return 0; + } + } + if (closedir (dp) == -1) + { + perror ("Error while reading from directory"); + } } else perror ("Couldn't open the directory"); --Kj7319i9nmIyA2yE--   Acknowledgement sent to "H. S. Teoh" <hsteoh@quickfur.ath.cx>:
Extra info received and forwarded to list. Copy sent to Ian Jackson <ian@davenant.greenend.org.uk>, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org.   -t  X-Loop: owner@bugs.debian.org From: owner@bugs.debian.org (Debian Bug Tracking System) To: "H. S. Teoh" Subject: Bug#12411: Info received (was [PATCH] A better Directory Lister example) Message-ID: In-Reply-To: <20021227031551.GA21364@crystal> References: <20021227031551.GA21364@crystal> X-Debian-PR-Message: ack-info 12411 Disabled-Doogie-Reply-To: 12411@bugs.debian.org Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) and to the developers mailing list to accompany the original report. As you requested using X-Debbugs-CC, your message was also forwarded to Ian Jackson (after having been given a Bug report number, if it did not have one). Your message has been sent to the package maintainer(s): GNU Libc Maintainers If you wish to continue to submit further information on your problem, please send it to 12411@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the Bug-tracking system. Debian bug tracking system administrator (administrator, Debian Bugs database)   Received: (at 12411) by bugs.debian.org; 27 Dec 2002 03:12:36 +0000 From hsteoh@quickfur.ath.cx Thu Dec 26 21:12:35 2002 Return-path: Received: from tomts16.bellnexxia.net (tomts16-srv.bellnexxia.net) [209.226.175.4] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18RkvL-0004CW-00; Thu, 26 Dec 2002 21:12:35 -0600 Received: from crystal ([64.229.0.21]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20021227031234.EKNV15095.tomts16-srv.bellnexxia.net@crystal>; Thu, 26 Dec 2002 22:12:34 -0500 Received: from hsteoh by crystal with local (Exim 3.36 #1 (Debian)) id 18RkyW-0005ZW-00; Thu, 26 Dec 2002 22:15:52 -0500 Date: Thu, 26 Dec 2002 22:15:52 -0500 To: 12411@bugs.debian.org, control@bugs.debian.org Subject: [PATCH] A better Directory Lister example Message-ID: <20021227031551.GA21364@crystal> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.4i X-Debbugs-CC: Ian Jackson From: "H. S. Teoh" Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-5.8 required=5.0 tests=PATCH_UNIFIED_DIFF,QUOTED_EMAIL_TEXT,SEARCH_ENGINE_PROMO, SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MUTT version=2.41 X-Spam-Level: --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tags 12411 + patch thanks Hi, attached is a patch that gives a better Directory Lister example. Ian's concerns are addressed as follows: > * it does not check the return values from closedir or puts; Now it does. > * it does not fflush stdout (so that errors writing stdout will not be > detected unless they happen more than one stdio buffer length from > the end of the output data); I have declined to address this, since this example is mainly concerned with using the libc directory reading functions, not with handling stdout errors. > * it prints the error message about failing to open the directory to > stdout instead of stderr; The current version of the info file uses perror(), which, as far as I know, print to stderr, not stdout. > * when the opendir fails it doesn't print the value of errno. I believe using perror() gives a sufficient representation of the value of errno. > Some people might say `hey, it's only an example, it doesn't matter if > it's crap'. However, programmers using this example when writing > their own code will probably replicate many of these mistakes, > producing programs with unreliable and unhelpful error behaviours. I agree, except that an example starts to lose its effectiveness to convey its intended message if real-life issues start to intrude upon it beyond what is necessary. Using fflush on stdout is one point that IMHO is beyond the scope of this example, although I do agree on the other points (to emphasize that one should always check the return code of syscalls and library calls, etc). > I suppose we can forgive it for ignoring its arguments, rather than > checking that it has none. I'm tempted to also address this in my proposed fix to the example, but as I said, this is getting near the point where it starts detracting from the point of the example. I personally regard it as extremely bad practice to declare main() as main(void); nevertheless, the stated purpose of this example is that it lists files in the current directory, and as such, it seems superfluous to declare and check for argc and argv. The official glibc maintainers can, of course, add this additional check to the example should they so choose. T -- LINUX = Lousy Interface for Nefarious Unix Xenophobes. --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="12411.patch" --- libc.info-24.ORIG 2002-12-26 21:47:28.000000000 -0500 +++ libc.info-24 2002-12-26 21:54:23.000000000 -0500 @@ -498,8 +498,17 @@ if (dp != NULL) { while (ep = readdir (dp)) - puts (ep->d_name); - (void) closedir (dp); + { + if (puts (ep->d_name) == EOF) + { + perror ("Unable to write to stdout"); + return 0; + } + } + if (closedir (dp) == -1) + { + perror ("Error while reading from directory"); + } } else perror ("Couldn't open the directory"); --Kj7319i9nmIyA2yE--   Tags added: patch Request was from "H. S. Teoh" <hsteoh@quickfur.ath.cx> to control@bugs.debian.org.   Received: (at control) by bugs.debian.org; 27 Dec 2002 03:12:35 +0000 From hsteoh@quickfur.ath.cx Thu Dec 26 21:12:35 2002 Return-path: Received: from tomts16.bellnexxia.net (tomts16-srv.bellnexxia.net) [209.226.175.4] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18RkvL-0004CW-00; Thu, 26 Dec 2002 21:12:35 -0600 Received: from crystal ([64.229.0.21]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20021227031234.EKNV15095.tomts16-srv.bellnexxia.net@crystal>; Thu, 26 Dec 2002 22:12:34 -0500 Received: from hsteoh by crystal with local (Exim 3.36 #1 (Debian)) id 18RkyW-0005ZW-00; Thu, 26 Dec 2002 22:15:52 -0500 Date: Thu, 26 Dec 2002 22:15:52 -0500 To: 12411@bugs.debian.org, control@bugs.debian.org Subject: [PATCH] A better Directory Lister example Message-ID: <20021227031551.GA21364@crystal> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.4i X-Debbugs-CC: Ian Jackson From: "H. S. Teoh" Delivered-To: control@bugs.debian.org X-Spam-Status: No, hits=-5.8 required=5.0 tests=PATCH_UNIFIED_DIFF,QUOTED_EMAIL_TEXT,SEARCH_ENGINE_PROMO, SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MUTT version=2.41 X-Spam-Level: --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tags 12411 + patch thanks Hi, attached is a patch that gives a better Directory Lister example. Ian's concerns are addressed as follows: > * it does not check the return values from closedir or puts; Now it does. > * it does not fflush stdout (so that errors writing stdout will not be > detected unless they happen more than one stdio buffer length from > the end of the output data); I have declined to address this, since this example is mainly concerned with using the libc directory reading functions, not with handling stdout errors. > * it prints the error message about failing to open the directory to > stdout instead of stderr; The current version of the info file uses perror(), which, as far as I know, print to stderr, not stdout. > * when the opendir fails it doesn't print the value of errno. I believe using perror() gives a sufficient representation of the value of errno. > Some people might say `hey, it's only an example, it doesn't matter if > it's crap'. However, programmers using this example when writing > their own code will probably replicate many of these mistakes, > producing programs with unreliable and unhelpful error behaviours. I agree, except that an example starts to lose its effectiveness to convey its intended message if real-life issues start to intrude upon it beyond what is necessary. Using fflush on stdout is one point that IMHO is beyond the scope of this example, although I do agree on the other points (to emphasize that one should always check the return code of syscalls and library calls, etc). > I suppose we can forgive it for ignoring its arguments, rather than > checking that it has none. I'm tempted to also address this in my proposed fix to the example, but as I said, this is getting near the point where it starts detracting from the point of the example. I personally regard it as extremely bad practice to declare main() as main(void); nevertheless, the stated purpose of this example is that it lists files in the current directory, and as such, it seems superfluous to declare and check for argc and argv. The official glibc maintainers can, of course, add this additional check to the example should they so choose. T -- LINUX = Lousy Interface for Nefarious Unix Xenophobes. --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="12411.patch" --- libc.info-24.ORIG 2002-12-26 21:47:28.000000000 -0500 +++ libc.info-24 2002-12-26 21:54:23.000000000 -0500 @@ -498,8 +498,17 @@ if (dp != NULL) { while (ep = readdir (dp)) - puts (ep->d_name); - (void) closedir (dp); + { + if (puts (ep->d_name) == EOF) + { + perror ("Unable to write to stdout"); + return 0; + } + } + if (closedir (dp) == -1) + { + perror ("Error while reading from directory"); + } } else perror ("Couldn't open the directory"); --Kj7319i9nmIyA2yE--   Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org:
Bug#12411; Package glibc-doc.   debian-bugs-dist@lists.debian.orgGNU Libc Maintainers glibc@packages.qa.debian.org  X-Loop: owner@bugs.debian.org Subject: Bug#12411: [PATCH] A better Directory Lister example Reply-To: Ian Jackson , 12411@bugs.debian.org Resent-From: Ian Jackson Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: GNU Libc Maintainers , glibc@packages.qa.debian.org Resent-Date: Sat, 28 Dec 2002 20:32:42 GMT Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: report 12411 X-Debian-PR-Package: glibc-doc X-Debian-PR-Keywords: patch Received: via spool by 12411-submit@bugs.debian.org id=B12411.104108001210528 (code B ref 12411); Sat, 28 Dec 2002 20:32:42 GMT From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> Date: Sat, 28 Dec 2002 12:53:28 +0000 To: "H. S. Teoh" , 12411@bugs.debian.org In-Reply-To: <20021227031551.GA21364@crystal> References: <20021227031551.GA21364@crystal> X-Mailer: VM 6.97 under Emacs 19.34.1 Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-8.2 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01 version=2.41 X-Spam-Level: H. S. Teoh writes ("Bug#12411: [PATCH] A better Directory Lister example"): ... > I have declined to address this, since this example is mainly concerned > with using the libc directory reading functions, not with handling stdout > errors. I actually think it's a libc bug, #28250. > > * it prints the error message about failing to open the directory to > > stdout instead of stderr; > > The current version of the info file uses perror(), which, as far as I > know, print to stderr, not stdout. I think some of the things I reported must have been fixed in the meantime. Thanks, Ian.   Acknowledgement sent to Ian Jackson <ian@davenant.greenend.org.uk>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org.   -t  X-Loop: owner@bugs.debian.org From: owner@bugs.debian.org (Debian Bug Tracking System) To: Ian Jackson Subject: Bug#12411: Info received (was Bug#12411: [PATCH] A better Directory Lister example) Message-ID: In-Reply-To: <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> References: <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> X-Debian-PR-Message: ack-info 12411 Disabled-Doogie-Reply-To: 12411@bugs.debian.org Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) and to the developers mailing list to accompany the original report. Your message has been sent to the package maintainer(s): GNU Libc Maintainers If you wish to continue to submit further information on your problem, please send it to 12411@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the Bug-tracking system. Debian bug tracking system administrator (administrator, Debian Bugs database)   Received: (at 12411) by bugs.debian.org; 28 Dec 2002 12:53:32 +0000 From ian@davenant.greenend.org.uk Sat Dec 28 06:53:31 2002 Return-path: Received: from chiark.greenend.org.uk [193.201.200.170] (mail) by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18SGT5-0002jb-00; Sat, 28 Dec 2002 06:53:31 -0600 Received: from (davenant.greenend.org.uk) [172.18.45.6] (mail) by chiark.greenend.org.uk with esmtp (Exim 3.12 #1) id 18SGT3-0001iI-00 (Debian); Sat, 28 Dec 2002 12:53:29 +0000 Received: from ian by davenant.greenend.org.uk with local (Exim 3.12 #1) id 18SGT3-00080e-00 (Debian); Sat, 28 Dec 2002 12:53:29 +0000 From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> Date: Sat, 28 Dec 2002 12:53:28 +0000 To: "H. S. Teoh" , 12411@bugs.debian.org Subject: Re: Bug#12411: [PATCH] A better Directory Lister example In-Reply-To: <20021227031551.GA21364@crystal> References: <20021227031551.GA21364@crystal> X-Mailer: VM 6.97 under Emacs 19.34.1 Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-8.2 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01 version=2.41 X-Spam-Level: H. S. Teoh writes ("Bug#12411: [PATCH] A better Directory Lister example"): ... > I have declined to address this, since this example is mainly concerned > with using the libc directory reading functions, not with handling stdout > errors. I actually think it's a libc bug, #28250. > > * it prints the error message about failing to open the directory to > > stdout instead of stderr; > > The current version of the info file uses perror(), which, as far as I > know, print to stderr, not stdout. I think some of the things I reported must have been fixed in the meantime. Thanks, Ian.   Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org:
Bug#12411; Package glibc-doc.   debian-bugs-dist@lists.debian.orgGNU Libc Maintainers glibc@packages.qa.debian.org  X-Loop: owner@bugs.debian.org Subject: Bug#12411: [PATCH] A better Directory Lister example Reply-To: "H. S. Teoh" , 12411@bugs.debian.org Resent-From: "H. S. Teoh" Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: GNU Libc Maintainers , glibc@packages.qa.debian.org Resent-Date: Mon, 30 Dec 2002 15:03:20 GMT Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: report 12411 X-Debian-PR-Package: glibc-doc X-Debian-PR-Keywords: patch Received: via spool by 12411-submit@bugs.debian.org id=B12411.104126059025861 (code B ref 12411); Mon, 30 Dec 2002 15:03:20 GMT Date: Mon, 30 Dec 2002 10:06:40 -0500 To: Ian Jackson Cc: 12411@bugs.debian.org Message-ID: <20021230150640.GC30445@crystal> References: <20021227031551.GA21364@crystal> <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> User-Agent: Mutt/1.4i From: "H. S. Teoh" Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-16.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_MUTT version=2.41 X-Spam-Level: On Sat, Dec 28, 2002 at 12:53:28PM +0000, Ian Jackson wrote: > H. S. Teoh writes ("Bug#12411: [PATCH] A better Directory Lister example"): > ... > > I have declined to address this, since this example is mainly concerned > > with using the libc directory reading functions, not with handling stdout > > errors. > > I actually think it's a libc bug, #28250. OK, IMHO, #28250 should be considered a more encompassing bug that includes this particular issue. I think for the purposes of #12411, it should be sufficient to leave it as it is, since when (if) #28250 gets resolved, we'll either have to revisit everything anyway, or it would be a non-issue (depending on which of the two main options are taken, according to the discussion in #28250 and related bugs). [snip] > > > * it prints the error message about failing to open the directory to > > > stdout instead of stderr; > > > > The current version of the info file uses perror(), which, as far as I > > know, print to stderr, not stdout. > > I think some of the things I reported must have been fixed in the > meantime. [snip] Yep. So does the current example (+ patch) sufficiently address the issues in this bug that it can be closed? T -- VI = Visual Irritation   Acknowledgement sent to "H. S. Teoh" <hsteoh@quickfur.ath.cx>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org.   -t  X-Loop: owner@bugs.debian.org From: owner@bugs.debian.org (Debian Bug Tracking System) To: "H. S. Teoh" Subject: Bug#12411: Info received (was Bug#12411: [PATCH] A better Directory Lister example) Message-ID: In-Reply-To: <20021230150640.GC30445@crystal> References: <20021230150640.GC30445@crystal> X-Debian-PR-Message: ack-info 12411 Disabled-Doogie-Reply-To: 12411@bugs.debian.org Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) and to the developers mailing list to accompany the original report. Your message has been sent to the package maintainer(s): GNU Libc Maintainers If you wish to continue to submit further information on your problem, please send it to 12411@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the Bug-tracking system. Debian bug tracking system administrator (administrator, Debian Bugs database)   Received: (at 12411) by bugs.debian.org; 30 Dec 2002 15:03:10 +0000 From hsteoh@quickfur.ath.cx Mon Dec 30 09:03:09 2002 Return-path: Received: from tomts19.bellnexxia.net (tomts19-srv.bellnexxia.net) [209.226.175.73] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18T1Rd-0006hv-00; Mon, 30 Dec 2002 09:03:09 -0600 Received: from crystal ([64.229.0.21]) by tomts19-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20021230150308.TASW24066.tomts19-srv.bellnexxia.net@crystal>; Mon, 30 Dec 2002 10:03:08 -0500 Received: from hsteoh by crystal with local (Exim 3.36 #1 (Debian)) id 18T1V2-0007xM-00; Mon, 30 Dec 2002 10:06:40 -0500 Date: Mon, 30 Dec 2002 10:06:40 -0500 To: Ian Jackson Cc: 12411@bugs.debian.org Subject: Re: Bug#12411: [PATCH] A better Directory Lister example Message-ID: <20021230150640.GC30445@crystal> References: <20021227031551.GA21364@crystal> <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15885.40648.852067.508990@davenant.relativity.greenend.org.uk> User-Agent: Mutt/1.4i From: "H. S. Teoh" Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-16.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_MUTT version=2.41 X-Spam-Level: On Sat, Dec 28, 2002 at 12:53:28PM +0000, Ian Jackson wrote: > H. S. Teoh writes ("Bug#12411: [PATCH] A better Directory Lister example"): > ... > > I have declined to address this, since this example is mainly concerned > > with using the libc directory reading functions, not with handling stdout > > errors. > > I actually think it's a libc bug, #28250. OK, IMHO, #28250 should be considered a more encompassing bug that includes this particular issue. I think for the purposes of #12411, it should be sufficient to leave it as it is, since when (if) #28250 gets resolved, we'll either have to revisit everything anyway, or it would be a non-issue (depending on which of the two main options are taken, according to the discussion in #28250 and related bugs). [snip] > > > * it prints the error message about failing to open the directory to > > > stdout instead of stderr; > > > > The current version of the info file uses perror(), which, as far as I > > know, print to stderr, not stdout. > > I think some of the things I reported must have been fixed in the > meantime. [snip] Yep. So does the current example (+ patch) sufficiently address the issues in this bug that it can be closed? T -- VI = Visual Irritation   Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson <ian@davenant.greenend.org.uk>, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org:
Bug#12411; Package glibc-doc.   debian-bugs-dist@lists.debian.orgIan Jackson GNU Libc Maintainers glibc@packages.qa.debian.org  X-Loop: owner@bugs.debian.org Subject: Bug#12411: [PATCH] A better Directory Lister example Reply-To: "H. S. Teoh" , 12411@bugs.debian.org Resent-From: "H. S. Teoh" Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Ian Jackson , GNU Libc Maintainers , glibc@packages.qa.debian.org Resent-Date: Mon, 30 Dec 2002 20:03:04 GMT Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: report 12411 X-Debian-PR-Package: glibc-doc X-Debian-PR-Keywords: patch Received: via spool by 12411-submit@bugs.debian.org id=B12411.10412783115886 (code B ref 12411); Mon, 30 Dec 2002 20:03:04 GMT Date: Mon, 30 Dec 2002 15:02:03 -0500 To: 12411@bugs.debian.org Message-ID: <20021230200203.GA1639@crystal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: "H. S. Teoh" Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-12.0 required=5.0 tests=QUOTED_EMAIL_TEXT,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_02_03, USER_AGENT,USER_AGENT_MUTT version=2.41 X-Spam-Level: Hi, resending this message through X-Debbugs-CC because Ian has for whatever reason decided to blacklist my ISP's mailserver: (Sighhh...) > Recipient: > Reason: Blacklisted site `[209.226.175.35]' [Irritated] Original message follows: On Sat, Dec 28, 2002 at 12:53:28PM +0000, Ian Jackson wrote: > H. S. Teoh writes ("Bug#12411: [PATCH] A better Directory Lister example"): > ... > > I have declined to address this, since this example is mainly concerned > > with using the libc directory reading functions, not with handling stdout > > errors. > > I actually think it's a libc bug, #28250. OK, IMHO, #28250 should be considered a more encompassing bug that includes this particular issue. I think for the purposes of #12411, it should be sufficient to leave it as it is, since when (if) #28250 gets resolved, we'll either have to revisit everything anyway, or it would be a non-issue (depending on which of the two main options are taken, according to the discussion in #28250 and related bugs). [snip] > > > * it prints the error message about failing to open the directory to > > > stdout instead of stderr; > > > > The current version of the info file uses perror(), which, as far as I > > know, print to stderr, not stdout. > > I think some of the things I reported must have been fixed in the > meantime. [snip] Yep. So does the current example (+ patch) sufficiently address the issues in this bug that it can be closed? T -- VI = Visual Irritation   Acknowledgement sent to "H. S. Teoh" <hsteoh@quickfur.ath.cx>:
Extra info received and forwarded to list. Copy sent to Ian Jackson <ian@davenant.greenend.org.uk>, GNU Libc Maintainers <debian-glibc@lists.debian.org>, glibc@packages.qa.debian.org.   -t  X-Loop: owner@bugs.debian.org From: owner@bugs.debian.org (Debian Bug Tracking System) To: "H. S. Teoh" Subject: Bug#12411: Info received (was Bug#12411: [PATCH] A better Directory Lister example) Message-ID: In-Reply-To: <20021230200203.GA1639@crystal> References: <20021230200203.GA1639@crystal> X-Debian-PR-Message: ack-info 12411 Disabled-Doogie-Reply-To: 12411@bugs.debian.org Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) and to the developers mailing list to accompany the original report. As you requested using X-Debbugs-CC, your message was also forwarded to Ian Jackson (after having been given a Bug report number, if it did not have one). Your message has been sent to the package maintainer(s): GNU Libc Maintainers If you wish to continue to submit further information on your problem, please send it to 12411@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the Bug-tracking system. Debian bug tracking system administrator (administrator, Debian Bugs database)   Received: (at 12411) by bugs.debian.org; 30 Dec 2002 19:58:31 +0000 From hsteoh@quickfur.ath.cx Mon Dec 30 13:58:31 2002 Return-path: Received: from tomts13-srv.bellnexxia.net [209.226.175.34] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 18T63S-0001Wh-00; Mon, 30 Dec 2002 13:58:31 -0600 Received: from crystal ([64.229.0.21]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20021230195830.BVVZ12997.tomts13-srv.bellnexxia.net@crystal> for <12411@bugs.debian.org>; Mon, 30 Dec 2002 14:58:30 -0500 Received: from hsteoh by crystal with local (Exim 3.36 #1 (Debian)) id 18T66t-0000R3-00 for <12411@bugs.debian.org>; Mon, 30 Dec 2002 15:02:03 -0500 Date: Mon, 30 Dec 2002 15:02:03 -0500 To: 12411@bugs.debian.org Subject: Re: Bug#12411: [PATCH] A better Directory Lister example Message-ID: <20021230200203.GA1639@crystal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Debbugs-CC: Ian Jackson From: "H. S. Teoh" Delivered-To: 12411@bugs.debian.org X-Spam-Status: No, hits=-12.0 required=5.0 tests=QUOTED_EMAIL_TEXT,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_02_03, USER_AGENT,USER_AGENT_MUTT version=2.41 X-Spam-Level: Hi, resending this message through X-Debbugs-CC because Ian has for whatever reason decided to blacklist my ISP's mailserver: (Sighhh...) > Recipient: > Reason: Blacklisted site `[209.226.175.35]' [Irritated] Original message follows: On Sat, Dec 28, 2002 at 12:53:28PM +0000, Ian Jackson wrote: > H. S. Teoh writes ("Bug#12411: [PATCH] A better Directory Lister example"): > ... > > I have declined to address this, since this example is mainly concerned > > with using the libc directory reading functions, not with handling stdout > > errors. > > I actually think it's a libc bug, #28250. OK, IMHO, #28250 should be considered a more encompassing bug that includes this particular issue. I think for the purposes of #12411, it should be sufficient to leave it as it is, since when (if) #28250 gets resolved, we'll either have to revisit everything anyway, or it would be a non-issue (depending on which of the two main options are taken, according to the discussion in #28250 and related bugs). [snip] > > > * it prints the error message about failing to open the directory to > > > stdout instead of stderr; > > > > The current version of the info file uses perror(), which, as far as I > > know, print to stderr, not stdout. > > I think some of the things I reported must have been fixed in the > meantime. [snip] Yep. So does the current example (+ patch) sufficiently address the issues in this bug that it can be closed? T -- VI = Visual Irritation   Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#12411; Package glibc-doc.   debian-bugs-dist@lists.debian.orgGNU Libc Maintainers  X-Loop: owner@bugs.debian.org Subject: Bug#12411: glibc-doc: new directory listing program Reply-To: Lars Wirzenius , 12411@bugs.debian.org Resent-From: Lars Wirzenius Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: GNU Libc Maintainers Resent-Date: Wed, 16 Feb 2005 22:48:15 UTC Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: report 12411 X-Debian-PR-Package: glibc-doc X-Debian-PR-Keywords: patch Received: via spool by 12411-submit@bugs.debian.org id=B12411.11085937088157 (code B ref 12411); Wed, 16 Feb 2005 22:48:15 UTC Received: (at 12411) by bugs.debian.org; 16 Feb 2005 22:41:48 +0000 Received: from ip212-226-168-228.adsl.kpnqwest.fi (esme.liw.iki.fi) [212.226.168.228] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1D1Xrg-00027M-00; Wed, 16 Feb 2005 14:41:48 -0800 Received: by esme.liw.iki.fi (Postfix, from userid 1000) id C3668E40C5; Thu, 17 Feb 2005 00:41:47 +0200 (EET) From: Lars Wirzenius To: 12411@bugs.debian.org Content-Type: multipart/mixed; boundary="=-7yuC4GuZDMPJ5ZrpNc46" Date: Thu, 17 Feb 2005 00:41:47 +0200 Message-Id: <1108593707.8770.57.camel@esme.liw.iki.fi> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 Delivered-To: 12411@bugs.debian.org X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: --=-7yuC4GuZDMPJ5ZrpNc46 Content-Type: text/plain Content-Transfer-Encoding: 7bit Attached is my attempt at writing a clear, yet succinct example for reading directory listings using opendir/readdir/closedir. I think mine is easier to follow (a more straightforward structure), but I'd be happy enough with the patch by H. S. Teoh. Once sarge is released and new libc packages can be developed again, I rather think it would be good to finally fix and close this 7 year old bug. :) --=-7yuC4GuZDMPJ5ZrpNc46 Content-Disposition: attachment; filename=dirlister.c Content-Type: text/x-csrc; name=dirlister.c; charset=ISO-8859-1 Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZSA8ZGly ZW50Lmg+DQojaW5jbHVkZSA8ZXJybm8uaD4NCg0KaW50DQptYWluICh2b2lkKQ0Kew0KICBESVIg KmRwOw0KICBzdHJ1Y3QgZGlyZW50ICplcDsNCg0KICAvKiBPcGVuIGRpcmVjdG9yeSwgY2hlY2sg Zm9yIGVycm9ycy4gICovDQogIGRwID0gb3BlbmRpciAoIi4vIik7DQogIGlmIChkcCA9PSBOVUxM KQ0KICAgIHsNCiAgICAgIHBlcnJvciAoIkNvdWxkbid0IG9wZW4gdGhlIGRpcmVjdG9yeSIpOw0K ICAgICAgcmV0dXJuIDE7DQogICAgfQ0KDQogIC8qIFJlYWQgZGlyZWN0b3J5IHVudGlsIGl0IGVu ZHMgb3IgdGhlcmUgaXMgYW4gZXJyb3IuICAqLw0KICB3aGlsZSAoKGVwID0gcmVhZGRpciAoZHAp KSAhPSBOVUxMKQ0KICAgICh2b2lkKSBwdXRzIChlcC0+ZF9uYW1lKTsgLyogSW4gdGhpcyBleGFt cGxlLCB3ZSBpZ25vcmUgcHV0cyBmYWlsdXJlLiAgKi8NCg0KICAvKiBDaGVjayBmb3IgZXJyb3Ig cmVhZGluZyBkaXJlY3RvcnkuIEVCQURGIGlzIHRoZSBvbmx5IGRvY3VtZW50ZWQgb25lLiAgKi8N CiAgaWYgKGVycm5vID09IEVCQURGKQ0KICAgIHsNCiAgICAgIHBlcnJvciAoIkNvdWxkbid0IHJl YWQgZGlyZWN0b3J5Iik7DQogICAgICByZXR1cm4gMTsNCiAgICB9DQogICAgDQogIC8qIENsb3Nl IGRpcmVjdG9yeSwgY2hlY2sgZm9yIGVycm9ycy4gICovDQogIGlmIChjbG9zZWRpciAoZHApID09 IC0xKQ0KICAgIHsNCiAgICAgIHBlcnJvciAoIkNvdWxkbid0IGNsb3NlIHRoZSBkaXJlY3Rvcnki KTsNCiAgICAgIHJldHVybiAxOw0KICAgIH0NCiAgDQogIHJldHVybiAwOw0KfQ0K --=-7yuC4GuZDMPJ5ZrpNc46--   Acknowledgement sent to Lars Wirzenius <liw@iki.fi>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.   -t  X-Loop: owner@bugs.debian.org From: owner@bugs.debian.org (Debian Bug Tracking System) To: Lars Wirzenius Subject: Bug#12411: Info received (was glibc-doc: new directory listing program) Message-ID: In-Reply-To: <1108593707.8770.57.camel@esme.liw.iki.fi> References: <1108593707.8770.57.camel@esme.liw.iki.fi> Precedence: bulk X-Debian-PR-Message: ack-info 12411 X-Debian-PR-Package: glibc-doc X-Debian-PR-Keywords: patch Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the package maintainer(s) and to other interested parties to accompany the original report. Your message has been sent to the package maintainer(s): GNU Libc Maintainers If you wish to continue to submit further information on your problem, please send it to 12411@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the Bug-tracking system. Debian bug tracking system administrator (administrator, Debian Bugs database)   Received: (at 12411) by bugs.debian.org; 16 Feb 2005 22:41:48 +0000 From liw@iki.fi Wed Feb 16 14:41:48 2005 Return-path: Received: from ip212-226-168-228.adsl.kpnqwest.fi (esme.liw.iki.fi) [212.226.168.228] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1D1Xrg-00027M-00; Wed, 16 Feb 2005 14:41:48 -0800 Received: by esme.liw.iki.fi (Postfix, from userid 1000) id C3668E40C5; Thu, 17 Feb 2005 00:41:47 +0200 (EET) Subject: glibc-doc: new directory listing program From: Lars Wirzenius To: 12411@bugs.debian.org Content-Type: multipart/mixed; boundary="=-7yuC4GuZDMPJ5ZrpNc46" Date: Thu, 17 Feb 2005 00:41:47 +0200 Message-Id: <1108593707.8770.57.camel@esme.liw.iki.fi> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 Delivered-To: 12411@bugs.debian.org X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: --=-7yuC4GuZDMPJ5ZrpNc46 Content-Type: text/plain Content-Transfer-Encoding: 7bit Attached is my attempt at writing a clear, yet succinct example for reading directory listings using opendir/readdir/closedir. I think mine is easier to follow (a more straightforward structure), but I'd be happy enough with the patch by H. S. Teoh. Once sarge is released and new libc packages can be developed again, I rather think it would be good to finally fix and close this 7 year old bug. :) --=-7yuC4GuZDMPJ5ZrpNc46 Content-Disposition: attachment; filename=dirlister.c Content-Type: text/x-csrc; name=dirlister.c; charset=ISO-8859-1 Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZSA8ZGly ZW50Lmg+DQojaW5jbHVkZSA8ZXJybm8uaD4NCg0KaW50DQptYWluICh2b2lkKQ0Kew0KICBESVIg KmRwOw0KICBzdHJ1Y3QgZGlyZW50ICplcDsNCg0KICAvKiBPcGVuIGRpcmVjdG9yeSwgY2hlY2sg Zm9yIGVycm9ycy4gICovDQogIGRwID0gb3BlbmRpciAoIi4vIik7DQogIGlmIChkcCA9PSBOVUxM KQ0KICAgIHsNCiAgICAgIHBlcnJvciAoIkNvdWxkbid0IG9wZW4gdGhlIGRpcmVjdG9yeSIpOw0K ICAgICAgcmV0dXJuIDE7DQogICAgfQ0KDQogIC8qIFJlYWQgZGlyZWN0b3J5IHVudGlsIGl0IGVu ZHMgb3IgdGhlcmUgaXMgYW4gZXJyb3IuICAqLw0KICB3aGlsZSAoKGVwID0gcmVhZGRpciAoZHAp KSAhPSBOVUxMKQ0KICAgICh2b2lkKSBwdXRzIChlcC0+ZF9uYW1lKTsgLyogSW4gdGhpcyBleGFt cGxlLCB3ZSBpZ25vcmUgcHV0cyBmYWlsdXJlLiAgKi8NCg0KICAvKiBDaGVjayBmb3IgZXJyb3Ig cmVhZGluZyBkaXJlY3RvcnkuIEVCQURGIGlzIHRoZSBvbmx5IGRvY3VtZW50ZWQgb25lLiAgKi8N CiAgaWYgKGVycm5vID09IEVCQURGKQ0KICAgIHsNCiAgICAgIHBlcnJvciAoIkNvdWxkbid0IHJl YWQgZGlyZWN0b3J5Iik7DQogICAgICByZXR1cm4gMTsNCiAgICB9DQogICAgDQogIC8qIENsb3Nl IGRpcmVjdG9yeSwgY2hlY2sgZm9yIGVycm9ycy4gICovDQogIGlmIChjbG9zZWRpciAoZHApID09 IC0xKQ0KICAgIHsNCiAgICAgIHBlcnJvciAoIkNvdWxkbid0IGNsb3NlIHRoZSBkaXJlY3Rvcnki KTsNCiAgICAgIHJldHVybiAxOw0KICAgIH0NCiAgDQogIHJldHVybiAwOw0KfQ0K --=-7yuC4GuZDMPJ5ZrpNc46--   Bug reassigned from package `glibc-doc' to `glibc-doc-reference'. Request was from Aurelien Jarno <aurelien@aurel32.net> to control@bugs.debian.org.   Received: (at control) by bugs.debian.org; 15 Aug 2006 19:35:20 +0000 From aurelien@aurel32.net Tue Aug 15 12:35:20 2006 Return-path: Received: from farad.aurel32.net ([82.232.2.251]) by spohr.debian.org with esmtp (Exim 4.50) id 1GD4h5-0003Ay-Rx for control@bugs.debian.org; Tue, 15 Aug 2006 12:35:20 -0700 Received: from bode.aurel32.net ([2001:618:400:fc13:211:9ff:feed:c498]) by farad.aurel32.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1GD4h2-0001v2-D3 for control@bugs.debian.org; Tue, 15 Aug 2006 21:35:17 +0200 Received: from aurel32 by bode.aurel32.net with local (Exim 4.62) (envelope-from ) id 1GD4h2-0000lK-N6 for control@bugs.debian.org; Tue, 15 Aug 2006 21:35:16 +0200 Date: Tue, 15 Aug 2006 21:35:16 +0200 From: Aurelien Jarno To: control@bugs.debian.org Subject: moving bugs from glibc-doc to glibc-doc-reference Message-ID: <20060815193516.GA30984@bode.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline X-Mailer: Mutt 1.5.12 (2006-07-14) User-Agent: Mutt/1.5.12-2006-07-14 Sender: Aurelien Jarno Delivered-To: control@bugs.debian.org X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Level: X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,VALID_BTS_CONTROL autolearn=no version=2.60-bugs.debian.org_2005_01_02 reassign 12411 glibc-doc-reference reassign 115298 glibc-doc-reference reassign 117205 glibc-doc-reference reassign 128336 glibc-doc-reference reassign 129550 glibc-doc-reference reassign 136727 glibc-doc-reference reassign 151101 glibc-doc-reference reassign 166404 glibc-doc-reference reassign 171851 glibc-doc-reference reassign 172663 glibc-doc-reference reassign 188677 glibc-doc-reference reassign 223937 glibc-doc-reference reassign 225569 glibc-doc-reference reassign 227554 glibc-doc-reference reassign 231384 glibc-doc-reference reassign 238169 glibc-doc-reference reassign 248405 glibc-doc-reference reassign 262104 glibc-doc-reference reassign 265245 glibc-doc-reference reassign 284988 glibc-doc-reference reassign 284989 glibc-doc-reference reassign 286137 glibc-doc-reference reassign 308341 glibc-doc-reference reassign 328898 glibc-doc-reference reassign 335171 glibc-doc-reference reassign 337013 glibc-doc-reference reassign 339572 glibc-doc-reference reassign 350055 glibc-doc-reference reassign 357051 glibc-doc-reference reassign 361565 glibc-doc-reference reassign 364964 glibc-doc-reference reassign 364966 glibc-doc-reference reassign 364969 glibc-doc-reference reassign 367849 glibc-doc-reference reassign 368453 glibc-doc-reference thanks glibc-doc-reference has been uploaded and contains the manual of the glibc which is non-free. A glibc without the manual will be uploaded shortly. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net   Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#12411; Package glibc-doc-reference.   debian-bugs-dist@lists.debian.orgGNU Libc Maintainers  X-Loop: owner@bugs.debian.org Subject: Bug#12411: Russian sends offiicials baack to school Reply-To: Livas Demeyer , 12411@bugs.debian.org Resent-From: "Livas Demeyer" Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: GNU Libc Maintainers Resent-Date: Mon, 08 Sep 2008 07:36:01 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: followup 12411 X-Debian-PR-Package: glibc-doc-reference X-Debian-PR-Keywords: patch X-Debian-PR-Source: glibc-doc-reference Received: via spool by 12411-submit@bugs.debian.org id=B12411.122085931428617 (code B ref 12411); Mon, 08 Sep 2008 07:36:01 +0000 Received: (at 12411) by bugs.debian.org; 8 Sep 2008 07:35:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rietz.debian.org X-Spam-Level: ** X-Spam-Status: No, score=2.7 required=4.0 tests=FOURLA,MULTALT,RCVD_IN_NIX1, RDNS_NONE autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: from [222.108.25.249] (helo=Virus01.sbs.co.kr) by rietz.debian.org with smtp (Exim 4.63) (envelope-from ) id 1KcbHF-0007Qj-KA for 12411@bugs.debian.org; Mon, 08 Sep 2008 07:35:14 +0000 Received: from nodnsquery(10.10.104.55) by Virus01.sbs.co.kr via csmap id 4739a6c6_7d97_11dd_8ad8_0002b3c94733_798; Mon, 08 Sep 2008 20:14:18 +0900 (KST) Date: Mon, 08 Sep 2008 07:35:13 +0000 From: "Livas Demeyer" X-Mailer: The Bat! (3.62.2) Professional X-Priority: 3 (Normal) Message-ID: <2416827171.20080908073313@netleadsinc.com> To: <12411@bugs.debian.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----------CA64797FDB18C9" ------------CA64797FDB18C9 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =09=20 =20 Over the earth, cruel that i am, covering myself used to hold their court), called sudharma. When hall were decorated with all manner of armour, warre on the sea: for as muche as he that destinguissheth by | the kings majesties servants. | written by. ------------CA64797FDB18C9 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =09 =09 =20 =09
=09 =09 =0A =09 =0A
F l AL y  VIAG8 A  your n= al R<= /TD>
EM E R -  ne re ity!
=09=09 =09 =0A =0A
W F LS .E Y
WW.NO ER N T




Over the earth, cruel that i am, covering myself used to
hold t= heir court), called sudharma. When hall were decorated
with all manner= of armour, warre on the sea: for as muche
as he that destinguissheth = by | the kings majesties servants.
| written by.

------------CA64797FDB18C9--   Acknowledgement sent to Livas Demeyer <waggoners@netleadsinc.com>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>.   -t  Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) Content-Type: text/plain; charset=utf-8 X-Loop: owner@bugs.debian.org From: owner@bugs.debian.org (Debian Bug Tracking System) To: Livas Demeyer Subject: Bug#12411: Info received (Russian sends offiicials baack to school) Message-ID: References: <2416827171.20080908073313@netleadsinc.com> X-Debian-PR-Message: ack-info 12411 X-Debian-PR-Package: glibc-doc-reference X-Debian-PR-Keywords: patch X-Debian-PR-Source: glibc-doc-reference Reply-To: 12411@bugs.debian.org Thank you for the additional information you have supplied regarding this Bug report. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): GNU Libc Maintainers If you wish to submit further information on this problem, please send it to 12411@bugs.debian.org, as before. Please do not send mail to owner@bugs.debian.org unless you wish to report a problem with the Bug-tracking system. --=20 12411: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D12411 Debian Bug Tracking System Contact owner@bugs.debian.org with problems   Received: (at 12411) by bugs.debian.org; 8 Sep 2008 07:35:14 +0000 From waggoners@netleadsinc.com Mon Sep 08 07:35:14 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rietz.debian.org X-Spam-Level: ** X-Spam-Status: No, score=2.7 required=4.0 tests=FOURLA,MULTALT,RCVD_IN_NIX1, RDNS_NONE autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Return-path: Received: from [222.108.25.249] (helo=Virus01.sbs.co.kr) by rietz.debian.org with smtp (Exim 4.63) (envelope-from ) id 1KcbHF-0007Qj-KA for 12411@bugs.debian.org; Mon, 08 Sep 2008 07:35:14 +0000 Received: from nodnsquery(10.10.104.55) by Virus01.sbs.co.kr via csmap id 4739a6c6_7d97_11dd_8ad8_0002b3c94733_798; Mon, 08 Sep 2008 20:14:18 +0900 (KST) Date: Mon, 08 Sep 2008 07:35:13 +0000 From: "Livas Demeyer" X-Mailer: The Bat! (3.62.2) Professional Reply-To: Livas Demeyer X-Priority: 3 (Normal) Message-ID: <2416827171.20080908073313@netleadsinc.com> To: <12411@bugs.debian.org> Subject: Russian sends offiicials baack to school MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----------CA64797FDB18C9" ------------CA64797FDB18C9 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =09=20 =20 Over the earth, cruel that i am, covering myself used to hold their court), called sudharma. When hall were decorated with all manner of armour, warre on the sea: for as muche as he that destinguissheth by | the kings majesties servants. | written by. ------------CA64797FDB18C9 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =09 =09 =20 =09
=09 =09 =0A =09 =0A
F l AL y  VIAG8 A  your n= al R<= /TD>
EM E R -  ne re ity!
=09=09 =09 =0A =0A
W F LS .E Y
WW.NO ER N T




Over the earth, cruel that i am, covering myself used to
hold t= heir court), called sudharma. When hall were decorated
with all manner= of armour, warre on the sea: for as muche
as he that destinguissheth = by | the kings majesties servants.
| written by.

------------CA64797FDB18C9--