From: <RGi...@a1...> - 2002-04-05 07:57:49
|
> > This leads me to the conclusion that the close-on-exit is broken on > > Darwin. > > > > Workaround: add a 'sleep 1' to the spawn command, > > i.e. spawn("someprog; sleep 1"). > > Let me make sure I understand the syntax you're proposing -- tack on > "; sleep 1" to spawn's first argument? To use an example from > Crypt:GPG, this > > my $expect = Expect->spawn ("$self->{GPGBIN}", @opts, '-o-', '--sign', > $armor, $detach, '--default-key', $self->{SECRETKEY}, $tmpnam); > > becomes this: > > my $expect = Expect->spawn ("$self->{GPGBIN}; sleep 1", @opts, '-o-', > '--sign', $armor, $detach, '--default-key', $self->{SECRETKEY}, > $tmpnam); No, add it as the last statement: my $expect = Expect->spawn ("$self->{GPGBIN} @opts -o- \ --sign $armor $detach --default-key $self->{SECRETKEY} \ $tmpnam; sleep 1"); This will pass everything to the shell, so you have to take care of shell metachars in your arguments, but that's seldom a problem. I added such a 'sleep' statement to all spawns in test.pl and now all tests pass (except those I added to specifically test for the bug). Have you tried the Crypt::GPG tests on a different platform? If you don't have access locally, I can recommend the SourceForge compile farm. It is important to try out to see if the problem is system- dependend or not. If you can reproduce the problem on a different architecture, then we have a pure application problem... Roland -- RGi...@cp... |