[16196] in Athena Bugs

home help back first fref pref prev next nref lref last post

sun4 8.2.8: attachandrun

daemon@ATHENA.MIT.EDU (Jacob Morzinski)
Thu Aug 20 18:25:17 1998

To: bugs@MIT.EDU
Date: Thu, 20 Aug 1998 18:25:15 EDT
From: "Jacob Morzinski" <jmorzins@MIT.EDU>

System name:		contents-vnder-pressvre.mit.edu
Type and version:	SPARC/5 8.2.8 (with mkserv)
Display type:		unknown

What were you trying to do?
	Start Maple using "attachandrun".

What's wrong:
	athena% attachandrun maple maple maple
	attachandrun: failure to exec maple: Exec format error
	Exit 3

What should have happened:
	Maple should have run.

Please describe any relevant documentation references:

	athena% head -3 /mit/maple/bin/maple
	: # Exec perl
	eval 'exec perl -S $0 "$@"'
	    if $running_under_some_shell;

	Whatever method "attachandrun" uses to exec files
	dislikes the ":" line at the head of the Perl wrapper
	scripts that Athena uses for launching many of its
	third-party applications.  (I tested /bin/sh's exec in a
	few cases, and was able to exec to the wrapper script
	without trouble.)

	Testing showed that attachandrun failed on the wrapper
	script on Irix, Solaris, and NetBSD platforms.  I was
	unable to find a "#!/bin/sh" line which includes the
	text string "perl" that worked on all three platforms.
	Starting the wrapper script with "#!/usr/athena/bin/perl"
	causes attachandrun to work properly, but would require
	changing the wrapper scripts in a lot of lockers.

	Since users' shells can exec the wrapper scripts
	successfully, I feel that attachandrun ought to be
	able to do so as well.

home help back first fref pref prev next nref lref last post