bronto has asked for the wisdom of the Perl Monks concerning the following question:
Dearest monks and nuns.
Recently I have been bitten by an unexpected behaviour of a commercial software. In short, if I started a daemon with qx in a perl script, it failed to work properly.
I am still investigating. Anyway, it seems that the daemon fails to work properly if it doesn't run under a "classic" Bourne shell, while qx runs it inside a Bash shell.
The following script:
#!/usr/bin/perl use strict ; use warnings ; my $output = qx'echo $SHELL' ; print $output ;
returns
/bin/bashThe man page for qx says:
qx/STRING/ ‘STRING‘ A string which is (possibly) interpolated and then exe- cuted as a system command with "/bin/sh" or its equiva- lent.[...]
This leads me to the question: how does qx select the aforementioned "/bin/sh equivalent"?
Ciao!
--bronto
In theory, there is no difference between theory and practice. In practice, there is.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how does qx select a "/bin/sh equivalent"?
by ikegami (Patriarch) on Jun 10, 2008 at 16:20 UTC | |
by gnujsa (Acolyte) on Jul 30, 2012 at 00:40 UTC | |
by ikegami (Patriarch) on Sep 17, 2012 at 05:25 UTC | |
Re: how does qx select a "/bin/sh equivalent"?
by almut (Canon) on Jun 10, 2008 at 15:37 UTC | |
Re: how does qx select a "/bin/sh equivalent"?
by pc88mxer (Vicar) on Jun 10, 2008 at 15:51 UTC |
Back to
Seekers of Perl Wisdom