From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v622) In-Reply-To: <20050715183006.GA21802@augusta.math.psu.edu> References: <20050715183006.GA21802@augusta.math.psu.edu> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3c689e333f7c49b26a5ea9493ab67d2c@ar.aichi-u.ac.jp> Content-Transfer-Encoding: 7bit From: arisawa@ar.aichi-u.ac.jp Subject: Re: [9fans] #!/bin/foo Date: Sat, 16 Jul 2005 07:08:21 +0900 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: 6808c71c-ead0-11e9-9d60-3106f5b1d025 > It is, but it's to prevent an endless loop.... Imagine if you had a > script named /usr/someone/blah that started, ``#!/usr/someone/blah''. > It would try to recursively start itself as a script, and the kernel > would (potentially) go into an endless loop. Thanks for your interest. Yes I know that, but I have experienced such an endless loop using only binary executables. the kernel crushed. of course the logic was not so simple. > Under Unix, you could probably get around it by doing something like, > #!/usr/bin/env script-to-use-as-interpreter. Some similar wrapper > could probably be written for Plan 9 to achieve the same effect. > that is easy but dirty. Kenji Arisawa