Unappropriate ioctl for device

Discussion in 'Perl Misc' started by Benoit Guillon, Jul 25, 2003.

  1. Hello,

    I upgraded Perl from 5.6 to 5.8. The software I develop used to work fine with
    Perl 5.6 and now, sometimes, I get the error "Unappropriate ioctl for device"
    when I try to open a file for write.

    My Perl version is v5.8.0 included in the Debian 'sid' - unstable.

    Does somebody have an idea ?

    Thanks,

    Benoit.


    --
    Ce message a ete poste via la plateforme Web club-Internet.fr
    This message has been posted by the Web platform club-Internet.fr

    http://forums.club-internet.fr/
     
    Benoit Guillon, Jul 25, 2003
    #1
    1. Advertising

  2. Benoit Guillon

    Guest

    Also sprach Benoit Guillon:
    > I upgraded Perl from 5.6 to 5.8. The software I develop used to work
    > fine with Perl 5.6 and now, sometimes, I get the error "Unappropriate
    > ioctl for device" when I try to open a file for write.


    Tassilo v. Parseval <> wrote:
    > That would be odd. There is no ioctl(2) involved when opening regular
    > files (I just checked with strace). Can you give a small example that
    > exhibits this behaviour?


    At a guess, the OP's actually reading/writing a *process* (not a regular
    file) in a UNIX environment and they have an unprotected "stty" command
    in their shell startup file (e.g. .bashrc, .cshrc, .kshrc, whatever).

    In which case, of course, it's not (directly) a perl issue, but an OS one.

    test -t 0 && stty... # Only try stty with a real terminal

    Chris
    --
    @s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
    until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}
     
    , Jul 28, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nishadixit
    Replies:
    5
    Views:
    1,259
    Joe Discar
    Jun 1, 2005
  2. Replies:
    1
    Views:
    430
    santosh
    Nov 27, 2006
  3. Laszlo Nagy
    Replies:
    0
    Views:
    741
    Laszlo Nagy
    May 31, 2007
  4. Une Bévue
    Replies:
    0
    Views:
    524
    Une Bévue
    Sep 7, 2008
  5. Replies:
    5
    Views:
    451
    Gunnar Hjalmarsson
    Jul 2, 2006
Loading...

Share This Page