Menu

#52 can't read from stdin (pass fds)

rfe
open-accepted
None
5
2002-09-16
2002-02-12
Anonymous
No

Hi,

The following test script breaks under speedycgi:

#!/usr/bin/speedy

read (STDIN, my $data, -s STDIN);
print "Data:\n$data\n";

Works fine under perl. The -s test fails for some
reason, I assume it's something to do without how
SpeedyCGI maps the file handles.

Cheers,

Alex

Discussion

  • Sam Horrocks

    Sam Horrocks - 2002-02-14

    Logged In: YES
    user_id=11128

    Since -s doesn't make sense on pipes and sockets, I assume
    the above code only works reliably when STDIN is a regular
    file.

    Since speedy always turns the stdio files into sockets, -s
    isn't going to work on STDIN in the current
    implementation. It might be possible to use I_SENDFD and
    pass over a file-descriptor when the stdio files are known
    to be regular files. I'll put this on the RFE list.

     
  • Sam Horrocks

    Sam Horrocks - 2002-02-14
    • milestone: 102372 --> rfe
    • assigned_to: nobody --> samh
    • status: open --> open-accepted
     
  • Sam Horrocks

    Sam Horrocks - 2002-09-16
    • summary: can't read from stdin --> can't read from stdin (pass fds)
     

Log in to post a comment.

Monday.com Logo