Package: randomize-lines
Version: 0.2.3
Severity: normal
File: /usr/bin/rl

I would expect the following to generate an error message and exit with 
status 1 (shell convention for an error):

        rl .newsrc > /dev/full; echo $?

Instead, rl blithely ignores all the write errors on stdout and exits with
status 0:

        $ rl .newsrc > /dev/full; echo $?
        0

Of course this makes it difficult to reliably use rl in a shell script where
write errors (e.g. disk full) might occur.

A workaround is to use the 'cat' program in a pipe:

        $ rl .newsrc | cat > /dev/full; echo $?
        cat: write error: No space left on device
        1

however this workaround doesn't cope with read failures on .newsrc, and the
shell code which does cope with that case isn't trivial.

The real fix is to simply check for (and report) errors on read and write
system calls within rl itself.

-- System Information:
Debian Release: 3.0
  APT prefers testing
  APT policy: (102, 'testing'), (101, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.28-zb5s
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages randomize-lines depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to