*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
"indicating whether the command processor is available.")
#define FUNC_NAME s_scm_system
{
- int rv;
-
+ int rv, eno;
+ char *c_cmd;
+
if (SCM_UNBNDP (cmd))
{
rv = system (NULL);
}
SCM_VALIDATE_STRING (1, cmd);
errno = 0;
- rv = system (SCM_STRING_CHARS (cmd));
+ c_cmd = scm_to_locale_string (cmd);
+ rv = system (c_cmd);
+ eno = errno; free (c_cmd); errno = eno;
if (rv == -1 || (rv == 127 && errno != 0))
SCM_SYSERROR;
return scm_from_int (rv);
"Example: (system* \"echo\" \"foo\" \"bar\")")
#define FUNC_NAME s_scm_system_star
{
- if (SCM_NULLP (args))
+ if (scm_is_null (args))
SCM_WRONG_NUM_ARGS ();
- if (SCM_CONSP (args))
+ if (scm_is_pair (args))
{
SCM oldint;
SCM oldquit;