diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/IO/Pty/Easy.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm index 791ba76..a75b391 100644 --- a/lib/IO/Pty/Easy.pm +++ b/lib/IO/Pty/Easy.pm @@ -113,6 +113,9 @@ sub spawn { my $self = shift; my $slave = $self->{pty}->slave; + croak "Attempt to spawn a subprocess when one is already running" + if $self->is_active; + # set up a pipe to use for keeping track of the child process during exec my ($readp, $writep); unless (pipe($readp, $writep)) { |