* [devel] Fwd: [AMaViS-user] Perl on Linux bug when reading and the last line does not terminate by a newline
@ 2005-05-15 17:21 ` Alexey Shabalin
2005-05-15 18:42 ` [devel] " Alexey Tourbin
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Shabalin @ 2005-05-15 17:21 UTC (permalink / raw)
To: ALT Devel discussion list
День добрый.
У нас вроде тоже самое.
Чем это может грозить?
---------- Forwarded message ----------
From: Sander Steffann <steffann@nederland.net>
Date: 15.05.2005 15:23
Subject: [AMaViS-user] Perl on Linux bug when reading and the last
line does not terminate by a newline
To: amavis-user@lists.sourceforge.net
Hi,
Just to keep everyone informed:
Mark Martinec wrote:
> Looks like another case of Perl on Linux problem of reading
> when the last line does not terminate by a newline. See:
>
> http://marc.theaimsgroup.com/?l=amavis-user&m=111458535106056
I reported this bug to Red Hat, and they have and escalated it.
Bye,
Sander.
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
--
Alexey Shabalin
^ permalink raw reply [flat|nested] 2+ messages in thread
* [devel] Re: Fwd: [AMaViS-user] Perl on Linux bug when reading and the last line does not terminate by a newline
2005-05-15 17:21 ` [devel] Fwd: [AMaViS-user] Perl on Linux bug when reading and the last line does not terminate by a newline Alexey Shabalin
@ 2005-05-15 18:42 ` Alexey Tourbin
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Tourbin @ 2005-05-15 18:42 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
On Sun, May 15, 2005 at 09:21:25PM +0400, Alexey Shabalin wrote:
> День добрый.
> У нас вроде тоже самое.
> Чем это может грозить?
Это гонево какое-то.
> > http://marc.theaimsgroup.com/?l=amavis-user&m=111458535106056
$ echo -n 'xxxx' | perl -e 'undef $!; while(<>){last if $_ eq "\n"}; $!==0 or die $!'
Bad file descriptor at -e line 1, <> line 1.
$
Это вовсе не ошибка. $! -- это errno, его нельзя в произвольном месте
программы проверять, а *только* сразу после вызова функции, которая
вернула "плохой статус" (undef) и которая в этом случае документированно
устанавливает errno. Т.е.
# правильное использование errno:
open(...) or die $!;
# редиски:
{ ... }
$!==0 or die $!;
Посмотрите в errno(3), там то же самое написано.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-15 18:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-15 17:21 ` [devel] Fwd: [AMaViS-user] Perl on Linux bug when reading and the last line does not terminate by a newline Alexey Shabalin
2005-05-15 18:42 ` [devel] " Alexey Tourbin
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git