Menu

#123 sipp leaves stdio in nonblocking state

v3.4
open
Rob Day
Execution (48)
4
2013-10-08
2010-05-19
Anonymous
No

This is a minor annoyance, but sipp changes stdio to nonblocking when invoked like this:
fcntl(fileno(stdin), F_SETFL, fcntl(fileno(stdin), F_GETFL) | O_NONBLOCK);

That is fine if sipp is invoked from a shell, as the shell will (hopefully) restore stdin to blocking state when sipp exits. If invoked from an interactive perl script via a system command, as I was doing, sipp leaves the stdin non-blocking when it exits. Which results in the perl script getting undef when attempting to collect input. This can be worked around by making sipp take input from /dev/null, but it would be a nicer behavior if there were an atexit function or some such that restored stdin to its initial state when sipp was invoked.

Discussion

  • Anonymous

    Anonymous - 2010-05-19

    BTW this is version: SIPp v3.1-PCAP, version unknown, built Apr 28 2010, 08:46:05.

     

    Last edit: Anonymous 2019-01-24
  • Rob Day

    Rob Day - 2012-12-15
    • assigned_to: Rob Day
    • milestone: --> v3.4
     
  • Rob Day

    Rob Day - 2013-10-07

    Thanks for this - I'll try to test and apply it this week.

     
  • Rob Day

    Rob Day - 2013-10-08

    Now in SIPp 3.4 beta1.

     

Log in to post a comment.