[Setup-tool-hackers] Compatibility considerations.
- From: Arturo Espinosa Aldama <arturo mezcal dyndns org>
- To: <setup-tool-hackers helixcode com>
- Subject: [Setup-tool-hackers] Compatibility considerations.
- Date: Thu, 1 Mar 2001 14:32:58 -0600 (CST)
Backend hackers: if you are going to call a program by any means different
from xst_run, please run /bin/sh explicitly.
As an exmple, I had this code to get ifconfig's output:
$tool_ifconfig = &xst_locate_tool ("ifconfig");
open IFCONFIG, "$tool_ifconfig 2>&1 |";
Now, 2>&1 is a shell directive, which may not work with the user's, or
root user's shell. So, I have to call /bin/sh explicitly:
$tool_ifconfig = &xst_locate_tool ("ifconfig");
open IFCONFIG, "/bin/sh -c \"$tool_ifconfig 2>&1\" |";
Same for any system() calls, although you should be using xst_run for that
case, in the first place. I'm modifying xst_run to call /bin/sh right now.
Greetings,
Arturo
_______________________________________________
setup-tool-hackers maillist - setup-tool-hackers@helixcode.com
http://lists.helixcode.com/mailman/listinfo/setup-tool-hackers
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]