in reply to Cannot use IO::Pty::Easy from within xinetd

If xinetd is properly configured, and everything is setup correctly, then run
/sbin/chkconfig --list | grep -i omshell
If the response is no output, then it's not setup, and you'll need to enter the file for omshell in /etc/xinetd.d. It would help if you posted some code.

Replies are listed 'Best First'.
Re^2: Cannot use IO::Pty::Easy from within xinetd
by kornerr (Novice) on Jul 02, 2010 at 08:59 UTC
    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.