Here's the complete example of the script:
#!/usr/bin/perl use strict; use warnings; use IO::Pty::Easy; # Get stdin when this char is found (Telnet). $/ = "\n"; # Autoflush, write without buffering (Telnet). $| = 1; # Main loop. undef $_; my $quit = 0; my $input; my $pty = IO::Pty::Easy->new(); do { $input = <STDIN>; # Remove trailing new line character. $input =~ s/\r//g; $input =~ s/\n//g; eval { if ($input =~ /quit/) { $quit = 1; } elsif ($input =~ /run/) { my $st = $pty->spawn("/usr/bin/omshell"); die "Cannot run /usr/bin/omshell" unless ($st); } else { reply(help()); } }; reply($@) if ($@); print "> "; } while (!$quit); sub help { #--------------------------------------------------------------------- +---------| return qq{ quit run Launch app over IO::Pty::Easy. }; } # Reply to user. sub reply { print shift, "\n"; }
If you run that with xinetd you will find out that subprocess cannot be launched.

In reply to Re^2: Cannot use IO::Pty::Easy from within xinetd by kornerr
in thread Cannot use IO::Pty::Easy from within xinetd by kornerr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.